Class: RVGP::Plot::Gnuplot::AreaChart
- Inherits:
-
ChartBuilder
- Object
- ChartBuilder
- RVGP::Plot::Gnuplot::AreaChart
- Defined in:
- lib/rvgp/plot/gnuplot.rb
Overview
This Chart element contains the logic necessary to render Integrals (shaded areas, under a line), onto the plot canvas.
Constant Summary
Constants inherited from ChartBuilder
ChartBuilder::ONE_MONTH_IN_SECONDS
Class Method Summary collapse
-
.types ⇒ Array<String>
The chart types we support, intended for use in the chart_type parameter of your plot yaml.
Instance Method Summary collapse
-
#initialize(opts, gnuplot) ⇒ AreaChart
constructor
Create a chart.
-
#series(_) ⇒ Hash<Symbol, Object>
The gnuplot data specifier components, for series n.
Methods inherited from ChartBuilder
Constructor Details
#initialize(opts, gnuplot) ⇒ AreaChart
Create a chart
170 171 172 173 174 |
# File 'lib/rvgp/plot/gnuplot.rb', line 170 def initialize(opts, gnuplot) super opts, gnuplot @reverse_series_range = opts[:is_stacked] reverse_series_colors! if reverse_series_range? end |
Class Method Details
.types ⇒ Array<String>
The chart types we support, intended for use in the chart_type parameter of your plot yaml. This class supports: ‘area’
187 188 189 |
# File 'lib/rvgp/plot/gnuplot.rb', line 187 def self.types %w[area] end |
Instance Method Details
#series(_) ⇒ Hash<Symbol, Object>
The gnuplot data specifier components, for series n
179 180 181 182 |
# File 'lib/rvgp/plot/gnuplot.rb', line 179 def series(_) { using: [1, using_data], with: "filledcurves x1 fillcolor '%<rgb>s'" } end |