Commit 0e0af57d authored by Paul Asmuth's avatar Paul Asmuth
Browse files

cleaning up

parent 512d4707
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ public:
      Series2D<double, double>* series,
      const std::string& line_style = kDefaultLineStyle,
      double line_width = kDefaultLineWidth,
      const std::string& point_style = kDefaultLineStyle,
      const std::string& point_style = kDefaultPointStyle,
      double point_size = kDefaultPointSize,
      bool smooth = false);

+5 −5
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ namespace fnordmetric {
namespace ui {

double PointChart::kDefaultPointSize = 3.0f;
char PointChart::kDefaultPointType[] = "circle";
char PointChart::kDefaultPointStyle[] = "circle";

PointChart::PointChart(
    Canvas* canvas,
@@ -26,7 +26,7 @@ PointChart::PointChart(

void PointChart::addSeries(
      Series2D<double, double>* series,
      const std::string& point_type /* = kDefaultPointType */,
      const std::string& point_style /* = kDefaultPointStyle */,
      double point_size /* = kDefaultPointSize */) {
  const auto& color = seriesColor(series);

@@ -35,7 +35,7 @@ void PointChart::addSeries(
    point.x = std::get<0>(spoint);
    point.y = std::get<1>(spoint);
    point.size = point_size;
    point.type = point_type; // FIXPAUL too many copies
    point.type = point_style; // FIXPAUL too many copies
    point.color = color; // FIXPAUL too many copies
    points_.emplace_back(point);
  }
@@ -43,7 +43,7 @@ void PointChart::addSeries(

void PointChart::addSeries(
    Series3D<double, double, double>* series,
    const std::string& point_type /* = kDefaultPointType */) {
    const std::string& point_style /* = kDefaultPointStyle */) {
  std::string color = seriesColor(series);

  for (const auto& spoint : series->getData()) {
@@ -51,7 +51,7 @@ void PointChart::addSeries(
    point.x = std::get<0>(spoint);
    point.y = std::get<1>(spoint);
    point.size = std::get<2>(spoint);
    point.type = point_type; // FIXPAUL too many copies
    point.type = point_style; // FIXPAUL too many copies
    point.color = color; // FIXPAUL too many copies
    points_.emplace_back(point);
  }
+3 −3
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ class Domain;
class PointChart : public Drawable {
public:
  static double kDefaultPointSize;
  static char kDefaultPointType[];
  static char kDefaultPointStyle[];

  /**
   * Create a new point chart
@@ -52,7 +52,7 @@ public:
   */
  void addSeries(
      Series2D<double, double>* series,
      const std::string& point_type = kDefaultPointType,
      const std::string& point_style = kDefaultPointStyle,
      double point_size = kDefaultPointSize);

  /**
@@ -63,7 +63,7 @@ public:
   */
  void addSeries(
      Series3D<double, double, double>* series,
      const std::string& point_type = kDefaultPointType);
      const std::string& point_style = kDefaultPointStyle);

  /**
   * Add an axis to the chart. This method should only be called after all
+19 −19
Original line number Diff line number Diff line
@@ -27,26 +27,26 @@ public:
  UITest() {}

  void run() {
    //testCanvasWithLeftAxis();
    //testCanvasWithLeftAxisAndTitle();
    //testCanvasWithLeftAndBottomAxis();
    //testCanvasWithAllAxis();
    //testCanvasWithAllMultiAxis();
    //testCanvasWithMultiLeftAxis();
    //testCanvasWithAxisFromNumericalDomain();
    //testSimpleBarChart();
    //testMultiSeriesBarChart();
    //testStackedBarChart();
    //testHorizontalBarChart();
    //testHorizontalMultiSeriesBarChart();
    //testHorizontalStackedBarChart();
    //testRangeBarChart();
    //testHorizontalRangeBarChart();
    //testSimplePointChart();
    //testVariableSizePointChart();
    //testSimpleLineChart();
    testCanvasWithLeftAxis();
    testCanvasWithLeftAxisAndTitle();
    testCanvasWithLeftAndBottomAxis();
    testCanvasWithAllAxis();
    testCanvasWithAllMultiAxis();
    testCanvasWithMultiLeftAxis();
    testCanvasWithAxisFromNumericalDomain();
    testSimpleBarChart();
    testMultiSeriesBarChart();
    testStackedBarChart();
    testHorizontalBarChart();
    testHorizontalMultiSeriesBarChart();
    testHorizontalStackedBarChart();
    testRangeBarChart();
    testHorizontalRangeBarChart();
    testSimplePointChart();
    testVariableSizePointChart();
    testSimpleLineChart();
    testPointLineChart();
    //testMultiChart();
    testMultiChart();
    testSimpleAreaChart();
  }