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

improved legend layouting code

parent 59768497
Loading
Loading
Loading
Loading
+120 −26
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ namespace plotfx {

static const double kDefaultLabelFontSizeEM = 1;
static const double kDefaultPaddingHorizEM = 2.4;
static const double kDefaultPaddingVertEM = 1.2;
static const double kDefaultPaddingVertEM = 1.6;
static const double kDefaultItemPaddingHorizEM = 2.4;
static const double kDefaultItemPaddingVertEM = 1.0;

@@ -57,6 +57,67 @@ void LegendConfig::addEntry(
  entries.emplace_back(std::move(item));
}

ReturnCode legend_layout(
    const LegendConfig& legend,
    Point origin,
    std::function<ReturnCode (size_t idx, Point p)> on_label,
    const Layer* layer,
    Rectangle* bbox) {
  auto font_size = from_em(kDefaultLabelFontSizeEM, layer->font_size);
  auto padding_item_right = measure_or(
      legend.item_margins[1],
      from_em(kDefaultItemPaddingHorizEM, font_size));

  double point_size = 5; // FIXME
  double line_height = font_size; // FIXME

  double sx = origin.x;
  double sy = origin.y;

  for (size_t idx = 0; idx < legend.entries.size(); ++idx) {
    const auto& e = legend.entries[idx];
    const auto& label_text = e.title;

    if (on_label) {
      if (auto rc = on_label(idx, Point(sx, sy + line_height / 2)); !rc) {
        return rc;
      }
    }

    TextStyle style;
    style.font = legend.font;
    style.font_size = font_size;

    Rectangle label_bbox;
    auto rc = text::text_measure_span(
        label_text,
        style.font,
        style.font_size,
        layer->dpi,
        layer->text_shaper.get(),
        &label_bbox);

    if (rc != OK) {
      return rc;
    }

    sx += point_size * 2.8; // FIXME
    sx += label_bbox.w;

    if (idx + 1< legend.entries.size()) {
      sx += padding_item_right;
    }
  }

  sy += line_height;

  if (bbox) {
    *bbox = Rectangle(origin.x, origin.y, sx - origin.x, sy - origin.y);
  }

  return OK;
}

ReturnCode legend_draw_inside(
    const LegendConfig& legend,
    const Rectangle& bbox,
@@ -67,6 +128,10 @@ ReturnCode legend_draw_inside(
      legend.margins[3],
      from_em(kDefaultPaddingHorizEM, font_size));

  double padding_right = measure_or(
      legend.margins[1],
      from_em(kDefaultPaddingHorizEM, font_size));

  double padding_top = measure_or(
      legend.margins[0],
      from_em(kDefaultPaddingVertEM, font_size));
@@ -81,35 +146,59 @@ ReturnCode legend_draw_inside(

  double point_size = 5; // FIXME

  double sx = bbox.x + padding_left;
  double sy = 0;
  double line_height;
  Rectangle content_bbox;
  if (auto rc = legend_layout(
      legend,
      Point(0, 0),
      nullptr,
      layer,
      &content_bbox);
      !rc) {
    return rc;
  }

  Point origin(0, 0);

  switch (legend.position_horiz) {
    case HAlign::LEFT:
      origin.x = std::min(
          bbox.x + padding_left,
          bbox.x + bbox.w);
      break;
    case HAlign::RIGHT:
      origin.x = std::max(
          bbox.x + bbox.w - content_bbox.w - padding_right,
          bbox.x);
      break;
    case HAlign::CENTER:
      origin.x = bbox.x + bbox.w / 2 - content_bbox.w / 2;
      break;
  }

  switch (legend.position_vert) {
    case VAlign::TOP:
      line_height = font_size; // FIXME
      sy = bbox.y + padding_top + line_height / 2;
      origin.y = bbox.y + padding_top;
      break;
    case VAlign::BOTTOM:
      line_height = -font_size; // FIXME
      sy = bbox.y + bbox.h - padding_bottom + line_height / 2;
      origin.y = bbox.y + bbox.h - content_bbox.h - padding_bottom;
      break;
    case VAlign::CENTER:
      line_height = font_size; // FIXME
      sy = bbox.y + bbox.h / 2;
      origin.y = bbox.y + bbox.h / 2;
      break;
  }

  for (const auto& e : legend.entries) {
  auto draw_label = [&] (size_t idx, Point pos) {
    const auto& e = legend.entries[idx];
    const auto& label_text = e.title;

    {
      FillStyle style;
      style.color = e.color;
      Path path;
      path.moveTo(sx + point_size, sy);
      path.arcTo(sx, sy, point_size, 0, M_PI * 2);
      path.moveTo(pos.x + point_size + point_size / 2, pos.y);
      path.arcTo(pos.x + point_size / 2, pos.y, point_size, 0, M_PI * 2);
      fillPath(layer, path, style);
      sx += point_size * 2.4;
      pos.x += point_size * 2.8; // FIXME
    }

    {
@@ -118,27 +207,28 @@ ReturnCode legend_draw_inside(
      style.font = legend.font;
      style.font_size = font_size;

      Rectangle label_bbox;
      auto rc = text::text_measure_span(
          label_text,
          style.font,
          style.font_size,
          layer->dpi,
          layer->text_shaper.get(),
          &label_bbox);

      if (auto rc = drawTextLabel(
            label_text,
            Point(sx, sy),
            pos,
            HAlign::LEFT,
            VAlign::CENTER,
            style,
            layer); rc != OK) {
        return rc;
      }

      sx += label_bbox.w + padding_item_right;
    }

    return OK;
  };

  if (auto rc = legend_layout(
      legend,
      origin,
      draw_label,
      layer,
      nullptr);
      !rc) {
    return rc;
  }

  return OK;
@@ -184,21 +274,25 @@ ReturnCode legend_configure_position(

    if (prop == "top") {
      *position_vert = VAlign::TOP;
      position_vert_set = true;
      continue;
    }

    if (prop == "bottom") {
      *position_vert = VAlign::BOTTOM;
      position_vert_set = true;
      continue;
    }

    if (prop == "left") {
      *position_horiz = HAlign::LEFT;
      position_horiz_set = true;
      continue;
    }

    if (prop == "right") {
      *position_horiz = HAlign::RIGHT;
      position_horiz_set = true;
      continue;
    }

+19 −0
Original line number Diff line number Diff line
width: 1200px;
height: 480px;

plot {
  legend: inside bottom center;
  legend-title: "The quick brown fox";

  series {
    title: "Series 1";
    xs: csv('tests/testdata/measurement.csv', 0);
    ys: csv('tests/testdata/measurement.csv', 2);
  }

  series {
    title: "Series 2";
    xs: csv('tests/testdata/measurement.csv', 0);
    ys: csv('tests/testdata/measurement.csv', 4);
  }
}
+76 −0
Original line number Diff line number Diff line
<svg xmlns="http://www.w3.org/2000/svg" width="1200.000000" height="480.000000" viewBox="0 0 1200.0 480.0" viewport-fill="#ffffff">
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 44.4 L1136.896875 44.4 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 44.4 L63.103125 49.733333 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M216.502239 44.4 L216.502239 49.733333 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M369.901353 44.4 L369.901353 49.733333 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M523.300483 44.4 L523.300483 49.733333 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M676.699581 44.4 L676.699581 49.733333 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M830.098679 44.4 L830.098679 49.733333 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M983.497841 44.4 L983.497841 49.733333 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 44.4 L1136.896875 49.733333 "/>
  <text x="16.204688" y="28.666667" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404278100.0</text>
  <text x="169.603802" y="28.666667" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404282685.7</text>
  <text x="323.002916" y="28.666667" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404287271.4</text>
  <text x="476.402046" y="28.666667" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404291857.1</text>
  <text x="629.801144" y="28.666667" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404296442.9</text>
  <text x="783.200242" y="28.666667" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404301028.6</text>
  <text x="936.599404" y="28.666667" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404305614.3</text>
  <text x="1089.998438" y="28.666667" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404310200.0</text>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 44.4 L1136.896875 435.6 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 435.6 L1131.563542 435.6 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 379.714283 L1131.563542 379.714283 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 323.828566 L1131.563542 323.828566 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 267.942844 L1131.563542 267.942844 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 212.057133 L1131.563542 212.057133 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 156.171422 L1131.563542 156.171422 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 100.285688 L1131.563542 100.285688 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 44.4 L1131.563542 44.4 "/>
  <text x="1148.630208" y="440.600000" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">0.0</text>
  <text x="1148.630208" y="384.714283" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">18.2</text>
  <text x="1148.630208" y="328.828566" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">36.4</text>
  <text x="1148.630208" y="272.942844" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">54.5</text>
  <text x="1148.630208" y="217.057133" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">72.7</text>
  <text x="1148.630208" y="161.171422" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">90.9</text>
  <text x="1148.630208" y="105.285688" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">109.1</text>
  <text x="1148.630208" y="49.400000" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">127.2</text>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 435.6 L1136.896875 435.6 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 435.6 L63.103125 430.266667 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M216.502239 435.6 L216.502239 430.266667 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M369.901353 435.6 L369.901353 430.266667 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M523.300483 435.6 L523.300483 430.266667 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M676.699581 435.6 L676.699581 430.266667 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M830.098679 435.6 L830.098679 430.266667 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M983.497841 435.6 L983.497841 430.266667 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M1136.896875 435.6 L1136.896875 430.266667 "/>
  <text x="16.204688" y="461.333333" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404278100.0</text>
  <text x="169.603802" y="461.333333" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404282685.7</text>
  <text x="323.002916" y="461.333333" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404287271.4</text>
  <text x="476.402046" y="461.333333" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404291857.1</text>
  <text x="629.801144" y="461.333333" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404296442.9</text>
  <text x="783.200242" y="461.333333" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404301028.6</text>
  <text x="936.599404" y="461.333333" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404305614.3</text>
  <text x="1089.998438" y="461.333333" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">1404310200.0</text>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 44.4 L63.103125 435.6 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 435.6 L68.436458 435.6 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 379.714283 L68.436458 379.714283 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 323.828566 L68.436458 323.828566 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 267.942844 L68.436458 267.942844 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 212.057133 L68.436458 212.057133 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 156.171422 L68.436458 156.171422 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 100.285688 L68.436458 100.285688 "/>
  <path stroke-width="1.333333" stroke="#a8a8a8" fill="none" d="M63.103125 44.4 L68.436458 44.4 "/>
  <text x="30.979167" y="440.600000" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">0.0</text>
  <text x="22.822917" y="384.714283" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">18.2</text>
  <text x="22.822917" y="328.828566" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">36.4</text>
  <text x="22.822917" y="272.942844" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">54.5</text>
  <text x="22.822917" y="217.057133" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">72.7</text>
  <text x="22.822917" y="161.171422" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">90.9</text>
  <text x="14.666667" y="105.285688" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">109.1</text>
  <text x="14.666667" y="49.400000" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">127.2</text>
  <path stroke-width="2.666667" stroke="#4572a7" fill="none" d="M63.103125 338.776071 L73.138581 346.841736 L83.174036 411.546008 L93.209492 408.61708 L103.244947 394.984292 L113.280403 426.050071 L123.315859 428.312019 L133.351314 408.677951 L143.38677 390.229862 L153.422225 427.630723 L163.457681 404.952901 L173.493137 413.55297 L183.528592 364.241915 L193.564048 379.958671 L203.599504 400.807048 L213.634959 376.690861 L223.670415 404.784038 L233.70587 416.751831 L243.741326 426.59825 L253.776782 426.98986 L263.812237 426.940676 L273.847693 381.921951 L283.883148 210.146803 L293.918604 79.301093 L303.95406 85.465651 L313.989515 96.699724 L324.024971 249.455747 L334.060426 290.244997 L344.095882 367.021538 L354.131338 406.837522 L364.166793 420.864175 L374.202249 417.179511 L384.237704 421.66246 L394.27316 417.206424 L404.308616 372.965693 L414.344071 369.094603 L424.379527 367.525661 L434.414982 350.270643 L444.450438 358.202457 L454.485894 371.81186 L464.521349 365.36209 L474.556805 343.327769 L484.592261 309.238359 L494.627716 313.099248 L504.663172 290.68365 L514.698627 326.039712 L524.734083 341.813174 L534.769539 378.329051 L544.804994 359.339974 L554.84045 296.431872 L564.875905 284.352192 L574.911361 314.632411 L584.946817 320.90638 L594.982272 312.247997 L605.017728 296.186539 L615.053183 359.927165 L625.088639 380.622433 L635.124095 323.661694 L645.15955 360.72335 L655.195006 402.080796 L665.230461 397.761633 L675.265917 354.900789 L685.301373 386.749985 L695.336828 390.148669 L705.372284 396.50488 L715.407739 389.772967 L725.443195 396.135751 L735.478651 372.3214 L745.514106 393.181849 L755.549562 380.158209 L765.585018 367.105229 L775.620473 378.664332 L785.655929 401.823264 L795.691384 418.482847 L805.72684 416.880292 L815.762296 414.858093 L825.797751 415.523452 L835.833207 416.071824 L845.868662 414.98104 L855.904118 415.869533 L865.939574 417.746091 L875.975029 416.364173 L886.010485 416.725336 L896.04594 415.605017 L906.081396 411.627893 L916.116852 410.221355 L926.152307 411.86916 L936.187763 409.936726 L946.223218 414.144192 L956.258674 410.257606 L966.29413 404.643269 L976.329585 416.503538 L986.365041 413.46469 L996.400496 378.97593 L1006.435952 411.642074 L1016.471408 411.611762 L1026.506863 412.412868 L1036.542319 413.548105 L1046.577775 411.950095 L1056.61323 412.53601 L1066.648686 413.043611 L1076.684141 414.412793 L1086.719597 412.588768 L1096.755053 414.477809 L1106.790508 408.631818 L1116.825964 404.854693 L1126.861419 407.027675 L1136.896875 412.367203 "/>
  <path stroke-width="2.666667" stroke="#aa4643" fill="none" d="M63.103125 435.380209 L73.138581 435.402748 L83.174036 435.464829 L93.209492 435.458344 L103.244947 435.463895 L113.280403 435.491024 L123.315859 435.465855 L133.351314 435.481963 L143.38677 435.430651 L153.422225 435.421719 L163.457681 435.288912 L173.493137 435.355447 L183.528592 435.373523 L193.564048 435.413962 L203.599504 435.426188 L213.634959 435.418232 L223.670415 435.409859 L233.70587 435.40784 L243.741326 435.422162 L253.776782 435.419893 L263.812237 435.436006 L273.847693 435.312938 L283.883148 435.346066 L293.918604 435.277059 L303.95406 435.327352 L313.989515 435.325751 L324.024971 435.314405 L334.060426 435.3424 L344.095882 435.372233 L354.131338 435.400869 L364.166793 435.317825 L374.202249 435.418296 L384.237704 435.405044 L394.27316 435.268025 L404.308616 435.278839 L414.344071 435.273667 L424.379527 435.27081 L434.414982 435.242483 L444.450438 435.263566 L454.485894 435.233275 L464.521349 435.28596 L474.556805 435.288042 L484.592261 435.323479 L494.627716 435.265655 L504.663172 435.282044 L514.698627 435.208428 L524.734083 435.28057 L534.769539 435.302295 L544.804994 435.384078 L554.84045 435.371217 L564.875905 435.371233 L574.911361 435.368642 L584.946817 435.371842 L594.982272 435.346944 L605.017728 435.380968 L615.053183 435.376463 L625.088639 435.361078 L635.124095 435.28505 L645.15955 435.293097 L655.195006 435.298576 L665.230461 435.324874 L675.265917 435.302454 L685.301373 435.396285 L695.336828 435.421388 L705.372284 435.394075 L715.407739 435.413022 L725.443195 435.424525 L735.478651 435.429336 L745.514106 435.39675 L755.549562 435.386542 L765.585018 435.405525 L775.620473 435.405703 L785.655929 435.419822 L795.691384 435.429986 L805.72684 435.448769 L815.762296 435.454576 L825.797751 435.460588 L835.833207 435.473097 L845.868662 435.472811 L855.904118 435.479366 L865.939574 435.464189 L875.975029 435.475978 L886.010485 435.468299 L896.04594 435.475371 L906.081396 435.475473 L916.116852 435.459595 L926.152307 435.459585 L936.187763 435.450764 L946.223218 435.460813 L956.258674 435.449431 L966.29413 435.446236 L976.329585 435.452781 L986.365041 435.458424 L996.400496 435.453509 L1006.435952 435.46683 L1016.471408 435.475136 L1026.506863 435.477433 L1036.542319 435.484597 L1046.577775 435.49071 L1056.61323 435.489154 L1066.648686 435.494067 L1076.684141 435.494874 L1086.719597 435.485663 L1096.755053 435.483077 L1106.790508 435.495043 L1116.825964 435.493062 L1126.861419 435.486926 L1136.896875 435.494283 "/>
  <path fill="#4572a7" d="M522.071875 404.8 M512.071875 404.8 a5.0 5.0 0 1 0 10.0 0 a5.0 5.0 0 1 0 -10.0 0 "/>
  <text x="528.571875" y="409.800000" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">Series 1</text>
  <path fill="#aa4643" d="M625.1 404.8 M615.1 404.8 a5.0 5.0 0 1 0 10.0 0 a5.0 5.0 0 1 0 -10.0 0 "/>
  <text x="631.600000" y="409.800000" fill="#333333" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif">Series 2</text>
</svg>
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
width: 1200px;
height: 480px;

plot {
  legend: inside bottom left;
  legend-title: "The quick brown fox";

  series {
    title: "Series 1";
    xs: csv('tests/testdata/measurement.csv', 0);
    ys: csv('tests/testdata/measurement.csv', 2);
  }

  series {
    title: "Series 2";
    xs: csv('tests/testdata/measurement.csv', 0);
    ys: csv('tests/testdata/measurement.csv', 4);
  }
}
+76 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading