Active
Project:
Highcharts
Version:
7.x-2.x-dev
Component:
API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jun 2013 at 18:42 UTC
Updated:
17 Jun 2013 at 13:22 UTC
line 322 of highcharts.options.inc
$options->yAxis->plotLines = (object) array(
'value' => 0,
'width' => 1,
'color' => '#808080',
);
should be
$options->yAxis->plotLines[] = (object) array(
'value' => 0,
'width' => 1,
'color' => '#808080',
);
in case the subclass wants to define more than 1 plotline
Comments
Comment #1
scottrigby@djdevin do you mean a custom class that extends
HighchartsOptionsLineBasic?If so, couldn't you just do this?
OTOH if you mean overriding the option through the Views UI,
highcharts_views_options_override()will override the originalyAxis.plotLinesoption altogether.This brings up a related Views UI / options override question we considered long ago - there is still no good way I can think of to allow adding objects through the Views UI (when objects are desired - I think we still need custom modules to do this). Do you have any thoughts on that?
Comment #2
djdevinThe Highcharts examples have it using an array:
http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.co...
Doesn't really matter how it's overridden, you might have a HighchartsOptionsLineBasicWithMarkers that will more simply modify the plotLines while inheriting HighchartsOptionsLineBasic's properties.
Also good to stick to what the API is expecting though, not sure why/how it even works when not an array.