class GerbilCharts::Charts::BarChartCompact
Compact bar chart¶ ↑
Tighter layout than a regular bar chart.
Public Class Methods
new(opt={})
click to toggle source
Calls superclass method
# File lib/gerbilcharts/charts/bar_chart_compact.rb, line 8 def initialize(opt={}) super(opt) end
Public Instance Methods
create_chart_elements()
click to toggle source
# File lib/gerbilcharts/charts/bar_chart_compact.rb, line 12 def create_chart_elements # anchor (line surface) @thechart.create_filter(GerbilCharts::SVGDC::LinearGradientVertical.new("vertgrad","rgb(255,255,255)","rgb(224,224,224)")) # additional filter by name @thechart.create_filter(GerbilCharts::SVGDC::LikeButton.new('LikeButton')) if @gerbilfilter == 'LikeButton' # other elements @thechart.add_child(GerbilCharts::Surfaces::SurfaceBackground.new(:orient => ORIENT_OVERLAY)) @thechart.add_child(GerbilCharts::Surfaces::TitlePanel.new(:orient => ORIENT_OVERLAY, :dim => 30, :just => :right)) @thechart.add_child(GerbilCharts::Surfaces::BarSurface.new(:orient => ORIENT_OVERLAY),:anchor => true) @thechart.add_child(GerbilCharts::Surfaces::HorizontalNameAxis.new(:orient => ORIENT_SOUTH, :dim => 30, :stagger => 2 )) end