class GerbilCharts::Charts::SquareLineChart
Square Line Chart¶ ↑
Each model is a squarized line.
options
width
-
Width of the chart (pixels)
height
-
Width of the chart (pixels)
style
-
Stylesheet file to be applied
global visual options
- +circle_data_points
-
draw a solid circle around each data point
Public Class Methods
new(opt={})
click to toggle source
Calls superclass method
GerbilCharts::Charts::ChartBase::new
# File lib/gerbilcharts/charts/square_line_chart.rb, line 18 def initialize(opt={}) super(opt) end
Public Instance Methods
create_chart_elements()
click to toggle source
# File lib/gerbilcharts/charts/square_line_chart.rb, line 22 def create_chart_elements # anchor (line surface) @thechart.create_filter(GerbilCharts::SVGDC::LinearGradientVertical.new("vertgrad","rgb(255,255,255)","rgb(192,192,192)")) # other elements @thechart.add_child(GerbilCharts::Surfaces::SurfaceBackground.new(:orient => ORIENT_OVERLAY)) @thechart.add_child(GerbilCharts::Surfaces::MarkBand.new(:orient => ORIENT_OVERLAY)) @thechart.add_child(GerbilCharts::Surfaces::BasicGrid.new(:orient => ORIENT_OVERLAY)) # optional features if @feature_timetracker @thechart.add_child(GerbilCharts::Surfaces::Tracker.new(:orient => ORIENT_OVERLAY )) end @thechart.add_child(GerbilCharts::Surfaces::SquareLineSurface.new(:orient => ORIENT_OVERLAY),:anchor => true) # link pivots if @feature_linkpivots @thechart.add_child(GerbilCharts::Surfaces::LinkPivots.new(:orient => ORIENT_OVERLAY )) end @thechart.add_child(GerbilCharts::Surfaces::TitlePanel.new(:orient => ORIENT_OVERLAY, :dim => 30)) @thechart.add_child(GerbilCharts::Surfaces::Legend.new(:orient=> ORIENT_OVERLAY, :dim => @legend_width)) @thechart.add_child(GerbilCharts::Surfaces::DetailedLegend.new(:orient=> ORIENT_OVERLAY, :dim => 3*@legend_width)) @thechart.add_child(GerbilCharts::Surfaces::VerticalAxis.new(:orient => ORIENT_WEST, :dim => 40 )) @thechart.add_child(GerbilCharts::Surfaces::HorizontalTimeAxis.new(:orient => ORIENT_SOUTH, :dim => 25 )) end