The settings for the Y axis title don't get saved. After setting highcharts formatting and saving the Y Axis title in the highcharts views UI, I reopen it and the Y axis i blank. This results in the following error when I look at the view:

Notice: Undefined index: yAxis in template_preprocess_views_highcharts() (line 21 of /Applications/MAMP/htdocs/drupal7/sites/all/modules/contrib/highcharts/theme/views_highcharts.theme.inc).
Notice: Undefined index: yAxis in template_preprocess_views_highcharts() (line 22 of /Applications/MAMP/htdocs/drupal7/sites/all/modules/contrib/highcharts/theme/views_highcharts.theme.inc).

Comments

somimi’s picture

I get the same error, and my Y-axis doesn't get saved either. Neither do my data labels for the X-axis seem to work, though I see that that's already been submitted as a separate issue,

somimi’s picture

Status: Active » Needs review
StatusFileSize
new11.78 KB
new6.35 KB

This issue seems to be caused by mismatched labeling between these two files: views_highcharts.theme.inc and views_highcharts_plugin_style_highcharts.inc.

I made a patch that solves the y-Axis labeling, but I still can't get the x-axis labels to show appropriately. I've got a date field for each node that's being graphed, and each group of bars should be labelled with their respective date on the x-axis. Any ideas? I imagine it's got to do with lines 38-70 or so of views_highcharts.theme.inc, but I need more help figuring out how to retrieve the appropriate field label from the view and populating the array with those values.

somimi’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha2
Status: Needs review » Patch (to be ported)

Hey stovak, have you had a chance to look at this issue? The latest alpha release still shows the same error that prevents the y-axis label from rendering appropriately. Take a look at line 148 of views_highcharts_plugin_style_highcharts.inc. It should be '#default_value' => $this->options['y_axis']['title'] instead of '#default_value' => $this->options['yAxis']['title_text']

And lines 28-29 of views_highcharts.theme.inc also use $options['yAxis'] instead of $options['y_axis'].

stovak’s picture

added and re-released as alpha 3.

wormz30’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.x-dev

I'm experiencing the same error and I have the latest 7.x version.

stovak’s picture

I believe this was fixed and remains fixed in Alpha 5...???

stovak’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

larskleiner’s picture

Component: User interface » API
Status: Closed (fixed) » Needs work

This one seems to have been fixed only in 7.x-1.0-alpha6 but not in 7.x-1.x-dev.

larskleiner’s picture

Status: Needs work » Closed (duplicate)

See http://drupal.org/node/1773498 for the underlying issue with #9.