Open thoran opened 11 years ago
This is probably more like it...
class Highcharts class PlotOptions class PlotType < Base
def initialize(opts = {})
@options = {
:stacking => opts[:stacking]
}
@suboptions = {
:dataLabels => 'Labels',
:dial => 'Base',
:events => 'PlotOptions::PlotType::Events',
:marker => 'PlotOptions::PlotType::Marker',
:pivot => 'Base',
:point => 'Point',
:states => 'PlotOptions::PlotType::States',
}
super
end
end
end end
Please patch with the above if it seems to be what you'd expect this to look like in order to have this functionality.
Thanks again!
I tried the following...
chart.plotOptions(series: {stacking: 'percent'})
which of course doesn't work, since I note that there is no built-in way to handle stacking, so I tried the following:
class Highcharts class PlotOptions class PlotType < Base
end end
Of course Base wants a Hash.
I also tried creating a custom class and setting the class constant string above to 'Stacking':
class Highcharts class Stacking < Base
end end
This sort-of works, but it renders as a 'normal' stacking and isn't settable.
If I want to do a quick hack by dropping in a new class definition or definitions, can you suggest how to go about it?
Otherwise, adding stacking to this library would be good.