lib/ruby_rich/dashboard.rb
def chart(type, x_column, y_column, name)

      prepare_dimension(x_column, x_column) if (@base_dimensions[x_column + "Dimension"] == nil)

      chart = Sol::Chart.build(type, x_column, y_column, name)

      # Set chart defaults. Should preferably be read from a config file 
      chart.elastic_y(true)
      chart.x_axis_label(x_column)
      chart.y_axis_label(y_column)
      chart.group(:reduce_sum)

      @charts[name] = chart
      chart

    end
#------------------------------------------------------------------------------------
# Create a new chart of the given type and name, usign x_column for the x_axis and 
# y_column for the Y axis.  Set the default values for the chart.  Those values can
# be changed by the user later.
#------------------------------------------------------------------------------------
Create a new chart of the given type and name, usign x_column for the x_axis and
y_column for the Y axis.  Set the default values for the chart.  Those values can
be changed by the user later.
Create a new chart of the given type and name usign x_column for the x_axis and y_column for the Y axis . Set the default values for the chart . Those values can be changed by the user later .
def chart(type, x_column, y_column, name)
      prepare_dimension(x_column, x_column) if (@base_dimensions[x_column + "Dimension"] == nil)
      chart = Sol::Chart.build(type, x_column, y_column, name)
      chart.elastic_y(true)
      chart.x_axis_label(x_column)
      chart.y_axis_label(y_column)
      chart.group(:reduce_sum)
      @charts[name] = chart
      chart
    end
def chart ( type , x_column , y_column , name ) prepare_dimension ( x_column , x_column ) if ( @base_dimensions [ x_column + "Dimension" ] == nil ) chart = Sol :: Chart . build ( type , x_column , y_column , name ) chart . elastic_y ( true ) chart . x_axis_label ( x_column ) chart . y_axis_label ( y_column ) chart . group ( :reduce_sum ) @charts [ name ] = chart chart end
Create a new chart of the given type and name, usign x_column for the x_axis and
y_column for the Y axis.
Create a new chart of the given type and name usign x_column for the x_axis and y_column for the Y axis .
# Set chart defaults. Should preferably be read from a config file 
type
x_column
y_column
name