Commit 3e6375a3 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

rename data-{x,y}-offset -> data-{x2,y2}

parent b1b51226
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -222,8 +222,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-x-offset", bind(&data_load, _1, &c->xoffset)},
    {"data-y-offset", bind(&data_load, _1, &c->yoffset)},
    {"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)},
    {"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)},
@@ -260,14 +262,14 @@ ReturnCode build(
      c->xoffset.size() != c->x.size()) {
    return error(
        ERROR,
        "the length of the 'data-x' and 'data-x-offset' properties must be equal");
        "the length of the 'data-x' and 'data-x2' 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-y-offset' properties must be equal");
        "the length of the 'data-y' and 'data-y2' properties must be equal");
  }

  /* scale autoconfig */
+6 −4
Original line number Diff line number Diff line
@@ -324,8 +324,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-x-offset", bind(&data_load, _1, &c->xoffset)},
    {"data-y-offset", bind(&data_load, _1, &c->yoffset)},
    {"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)},
    {"bar-width", bind(&data_load, _1, &c->sizes)},
    {"bar-widths", bind(&data_load, _1, &c->sizes)},
    {"bar-offset", bind(&data_load, _1, &c->offsets)},
@@ -367,14 +369,14 @@ ReturnCode build(
      c->xoffset.size() != c->x.size()) {
    return error(
        ERROR,
        "the length of the 'data-x' and 'data-x-offset' properties must be equal");
        "the length of the 'data-x' and 'data-x2' 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-y-offset' properties must be equal");
        "the length of the 'data-y' and 'data-y2' properties must be equal");
  }


+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, _1, x)},
    {"data-y", bind(&data_load, _1, y)},
    {"data-x-offset", bind(&data_load, _1, x)},
    {"data-y-offset", bind(&data_load, _1, y)},
    {"data-x2", bind(&data_load, _1, x)},
    {"data-y2", bind(&data_load, _1, y)},
  }, false);

  if (!config_rc) {
+2 −2
Original line number Diff line number Diff line
@@ -7,12 +7,12 @@
    areas (
        data-x (csv "tests/testdata/areadata2.csv" x)
        data-y (csv "tests/testdata/areadata2.csv" z)
        data-y-offset (csv "tests/testdata/areadata2.csv" y)
        data-y2 (csv "tests/testdata/areadata2.csv" y)
        color (#ccc))
    areas (
        data-x (csv "tests/testdata/areadata2.csv" x)
        data-y (csv "tests/testdata/areadata2.csv" z2)
        data-y-offset (csv "tests/testdata/areadata2.csv" y2)
        data-y2 (csv "tests/testdata/areadata2.csv" y2)
        color (#888))
    lines (
        data-x (10 20 30 40 50)
+2 −2
Original line number Diff line number Diff line
@@ -7,14 +7,14 @@
    bars (
      data-x (csv "tests/testdata/bardata.csv" var0)
      data-y (csv "tests/testdata/bardata.csv" var1)
      data-y-offset (csv "tests/testdata/bardata.csv" var2)
      data-y2 (csv "tests/testdata/bardata.csv" var2)
      bar-width (1em)
      bar-offset (-.8em)
      color (#ccc))
    bars (
      data-x (csv "tests/testdata/bardata.csv" var0)
      data-y (csv "tests/testdata/bardata.csv" var4)
      data-y-offset (csv "tests/testdata/bardata.csv" var5)
      data-y2 (csv "tests/testdata/bardata.csv" var5)
      bar-width (1em)
      bar-offset (.8em)
      color (#666)))
Loading