-
Notifications
You must be signed in to change notification settings - Fork 19
HighCharts features
To use HighStock, daru-view user just need to pass an additional option chart_class
with its value as 'stock'.
For example:
For more examples do visit the following links.
- HighStock - Chart types
- HighStock - General
- HighStock - Various Features
Following are the steps to know how js code has been generated.
-
Firstly, daru-view user will generate the Daru::View::Plot(data, options) object and will call
div
(for web frameworks andshow_in_iruby
for IRuby notebook). -
As
plotting_library
must already be set to :highcharts, transfer goes to highcharts.rb and then to the display.rb (when the methodsdiv
andshow_in_iruby
are called). -
Now, in web frameworks ultimately to_html is called. In
to_html
-
load_dependences
is called to load the additional dependencies:- Modules will be loaded only if any dependencies are provided in
modules
option. These are the additional modules required to draw the chart apart from the ones loaded while setting the plotting_library. Once amodule
is loaded then there is no need afterwards to load it again. - If the HighMap is being drawn by the user, then the required map data will be extracted from options[:map][:chart].
- Modules will be loaded only if any dependencies are provided in
-
chart_class
is extracted and compared. -
If
class_chart
equalsStockChart
, then high_stock method from lazy_high_charts is called.
-
-
In Iruby notebook, ultimately
show_in_iruby
is called in display.rb. Inshow_in_iruby
- Dependencies are similarly loaded if any.
- Extracted
chart_class
is passed to high_chart_iruby method. - All of the code to generate js in IRuby notebook is present in layout_helper_iruby.rb.
To use HighMap, a daru-view user just need to pass an additional option chart_class
with its value as 'map'.
For example:
HighMaps additional official examples for each country can be found here. For more examples do visit the following links.
- HighMaps - Countries
- HighMaps - General
- HighMaps - Series type
- HighMaps - Dynamic
Following are the steps to know how js code has been generated.
-
Firstly, daru-view user will generate the Daru::View::Plot(data, options) object and will call
div
(for web frameworks andshow_in_iruby
for IRuby notebook). -
As
plotting_library
must already be set to :highcharts, transfer goes to highcharts.rb and then to the display.rb (when the methodsdiv
andshow_in_iruby
are called). -
Now, in web frameworks ultimately to_html is called. In
to_html
-
load_dependences
is called to load the additional dependencies:- Modules will be loaded only if any dependencies are provided in
modules
option. These are the additional modules required to draw the chart apart from the ones loaded while setting the plotting_library. Once amodule
is loaded then there is no need afterwards to load it again. - If the HighMap is being drawn by the user, then the required map data will be extracted from options[:map][:chart].
- Modules will be loaded only if any dependencies are provided in
-
chart_class
is extracted and compared. -
If
class_chart
equalsMap
, thenhigh_map
method is called to generate the js.
-
-
In Iruby notebook, ultimately
show_in_iruby
is called in display.rb. Inshow_in_iruby
- Dependencies are similarly loaded if any.
- Extracted
chart_class
is passed to high_chart_iruby method. - All of the code to generate js in IRuby notebook is present in layout_helper_iruby.rb.