Commit 2876f8ec authored by Paul Asmuth's avatar Paul Asmuth
Browse files

stub Drawable#addLegend

parent bbfad2df
Loading
Loading
Loading
Loading
+32 −1
Original line number Diff line number Diff line
@@ -24,6 +24,21 @@ class Canvas;
class Drawable {
  friend class Canvas;
public:
  enum kLegendVerticalPosition {
    LEGEND_TOP = 0,
    LEGEND_BOTTOM = 1
  };

  enum kLegendHorizontalPosition {
    LEGEND_LEFT = 0,
    LEGEND_RIGHT = 1
  };

  enum kLegendPlacement {
    LEGEND_INSIDE = 0,
    LEGEND_OUTSIDE = 1
  };


  Drawable(Canvas* canvas) : canvas_(canvas) {}
  virtual ~Drawable() {}
@@ -50,7 +65,6 @@ public:

  /**
   * Add a grid to the chart.
   *
   */
  void addGrid(bool horizontal, bool vertical) {
    RAISE(
@@ -60,6 +74,23 @@ public:
        vertical ? "true" : "false");
  }

  /**
   * Add a legend to the chart.
   */
  void addLegend(
      kLegendVerticalPosition vert_pos,
      kLegendHorizontalPosition horiz_pos,
      kLegendPlacement placement,
      const std::string& title) {
    RAISE(
        util::RuntimeException,
        "legend not implemented: horiz=%i, vert=%i placement=%i title=%s",
        vert_pos,
        horiz_pos,
        placement,
        title.c_str());
  }

  /**
   * Get the {x,y,z} domain of this chart. May raise an exception if the chart
   * does not implement the requested domain.