Commit e05f4ef4 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

rename data-{x,y}{1,2} -> data-{x,y}-{high,low}

parent 4eca630e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -227,10 +227,10 @@ ReturnCode build(
  auto config_rc = expr_walk_map(expr_next(expr), {
    {"data-x", bind(&data_load, _1, &c->x)},
    {"data-y", bind(&data_load, _1, &c->y)},
    {"data-x1", bind(&data_load, _1, &c->x)},
    {"data-y1", bind(&data_load, _1, &c->y)},
    {"data-x2", bind(&data_load, _1, &c->xoffset)},
    {"data-y2", bind(&data_load, _1, &c->yoffset)},
    {"data-x-high", bind(&data_load, _1, &c->x)},
    {"data-y-high", bind(&data_load, _1, &c->y)},
    {"data-x-low", bind(&data_load, _1, &c->xoffset)},
    {"data-y-low", bind(&data_load, _1, &c->yoffset)},
    {"limit-x", bind(&expr_to_float64_opt_pair, _1, &c->scale_x.min, &c->scale_x.max)},
    {"limit-x-min", bind(&expr_to_float64_opt, _1, &c->scale_x.min)},
    {"limit-x-max", bind(&expr_to_float64_opt, _1, &c->scale_x.max)},
@@ -308,14 +308,14 @@ ReturnCode build(
      c->xoffset.size() != c->x.size()) {
    return error(
        ERROR,
        "the length of the 'data-x' and 'data-x2' properties must be equal");
        "the length of the 'data-x' and 'data-x-low' properties must be equal");
  }

  if (!c->yoffset.empty() &&
      c->yoffset.size() != c->y.size()) {
    return error(
        ERROR,
        "the length of the 'data-y' and 'data-y2' properties must be equal");
        "the length of the 'data-y' and 'data-y-low' properties must be equal");
  }

  /* return element */
+12 −12
Original line number Diff line number Diff line
@@ -25,21 +25,21 @@ properties:

          ;; load a csv file
          data-x (csv myfile.csv mycolumn)
      - name: data-x1
      - name: data-x-high
        alias: data-x
      - name: data-x2
      - name: data-x-low
        desc: |
          Set the 'x2' dataset for the plot. The 'x2' dataset will be used to
          calculate the horizontal position of geometry.
        desc_code: |
          data-x2 (<values>...)
          data-x2 (csv <file> <column>)
          data-x-low (<values>...)
          data-x-low (csv <file> <column>)
        examples: |
          ;; list of static values
          data-x2 (10px 20px 30px)
          data-x-low (10px 20px 30px)

          ;; load a csv file
          data-x2 (csv myfile.csv mycolumn)
          data-x-low (csv myfile.csv mycolumn)
      - name: data-y
        desc: |
          Set the 'y' dataset for the plot. The 'y' dataset will be used to
@@ -53,21 +53,21 @@ properties:

          ;; load a csv file
          data-y (csv myfile.csv mycolumn)
      - name: data-y1
      - name: data-y-high
        alias: data-y
      - name: data-y2
      - name: data-y-low
        desc: |
          Set the 'y2' dataset for the plot. The 'y2' dataset will be used to
          calculate the vertical position of geometry.
        desc_code: |
          data-y2 (<values>...)
          data-y2 (csv <file> <column>)
          data-y-low (<values>...)
          data-y-low (csv <file> <column>)
        examples: |
          ;; list of static values
          data-y2 (10px 20px 30px)
          data-y-low (10px 20px 30px)

          ;; load a csv file
          data-y2 (csv myfile.csv mycolumn)
          data-y-low (csv myfile.csv mycolumn)
      - name: direction
        desc: |
          Set the area 'direction'.
+6 −6
Original line number Diff line number Diff line
@@ -329,10 +329,10 @@ ReturnCode build(
  auto config_rc = expr_walk_map(expr_next(expr), {
    {"data-x", bind(&data_load_strings, _1, &data_x)},
    {"data-y", bind(&data_load_strings, _1, &data_y)},
    {"data-x1", bind(&data_load_strings, _1, &data_x)},
    {"data-y1", bind(&data_load_strings, _1, &data_y)},
    {"data-x2", bind(&data_load_strings, _1, &data_xoffset)},
    {"data-y2", bind(&data_load_strings, _1, &data_yoffset)},
    {"data-x-high", bind(&data_load_strings, _1, &data_x)},
    {"data-y-high", bind(&data_load_strings, _1, &data_y)},
    {"data-x-low", bind(&data_load_strings, _1, &data_xoffset)},
    {"data-y-low", bind(&data_load_strings, _1, &data_yoffset)},
    {"bar-width", bind(&data_load, _1, &c->sizes)},
    {"bar-widths", bind(&data_load, _1, &c->sizes)},
    {"bar-offset", bind(&data_load, _1, &c->offsets)},
@@ -418,14 +418,14 @@ ReturnCode build(
      c->xoffset.size() != c->x.size()) {
    return error(
        ERROR,
        "the length of the 'data-x' and 'data-x2' properties must be equal");
        "the length of the 'data-x' and 'data-x-low' properties must be equal");
  }

  if (!c->yoffset.empty() &&
      c->yoffset.size() != c->y.size()) {
    return error(
        ERROR,
        "the length of the 'data-y' and 'data-y2' properties must be equal");
        "the length of the 'data-y' and 'data-y-low' properties must be equal");
  }

  /* return element */
+12 −12
Original line number Diff line number Diff line
@@ -25,21 +25,21 @@ properties:

          ;; load a csv file
          data-x (csv myfile.csv mycolumn)
      - name: data-x1
      - name: data-x-high
        alias: data-x
      - name: data-x2
      - name: data-x-low
        desc: |
          Set the 'x2' dataset for the plot. The 'x2' dataset will be used to
          calculate the horizontal position of geometry.
        desc_code: |
          data-x2 (<values>...)
          data-x2 (csv <file> <column>)
          data-x-low (<values>...)
          data-x-low (csv <file> <column>)
        examples: |
          ;; list of static values
          data-x2 (10px 20px 30px)
          data-x-low (10px 20px 30px)

          ;; load a csv file
          data-x2 (csv myfile.csv mycolumn)
          data-x-low (csv myfile.csv mycolumn)
      - name: data-y
        desc: |
          Set the 'y' dataset for the plot. The 'y' dataset will be used to
@@ -53,21 +53,21 @@ properties:

          ;; load a csv file
          data-y (csv myfile.csv mycolumn)
      - name: data-y1
      - name: data-y-high
        alias: data-y
      - name: data-y2
      - name: data-y-low
        desc: |
          Set the 'y2' dataset for the plot. The 'y2' dataset will be used to
          calculate the vertical position of geometry.
        desc_code: |
          data-y2 (<values>...)
          data-y2 (csv <file> <column>)
          data-y-low (<values>...)
          data-y-low (csv <file> <column>)
        examples: |
          ;; list of static values
          data-y2 (10px 20px 30px)
          data-y-low (10px 20px 30px)

          ;; load a csv file
          data-y2 (csv myfile.csv mycolumn)
          data-y-low (csv myfile.csv mycolumn)
      - name: color
        alias: colors
      - name: colors
+2 −2
Original line number Diff line number Diff line
@@ -231,8 +231,8 @@ ReturnCode configure_geom(
  auto config_rc = expr_walk_map(opts.get(), {
    {"data-x", bind(&data_load_strings, _1, x)},
    {"data-y", bind(&data_load_strings, _1, y)},
    {"data-x2", bind(&data_load_strings, _1, x)},
    {"data-y2", bind(&data_load_strings, _1, y)},
    {"data-x-low", bind(&data_load_strings, _1, x)},
    {"data-y-low", bind(&data_load_strings, _1, y)},
  }, false);

  if (!config_rc) {
Loading