I've created a view & set it to Highchart format. My view is not showing any field content, & i get the following error in the logs:

Notice: Undefined index: ViewsHighchartsOptionsLineBasic in ViewsHighchartsOptions->__construct() (line 44 of /hosting/collectiverecyclers/com/htdocs/cms_sandbox/sites/all/modules/highcharts/views/highcharts_views.options.inc).

Maybe they are related, I'm not sure. Perhaps I have my view constructed wrong, since i haven't been able to find any good documentation on the Highcharts module yet.

Comments

SteveK’s picture

getting the same issue. Not sure where to start with configuring this module.

Anonymous’s picture

Priority: Normal » Major

This appears to be preventing Highcharts from displaying any data in all chart types (i.e., from working at all).

scottrigby’s picture

@rhclayto and @SteveK - Views integration has yet to be finished (the project page clarifies this under Versions > 2.x Views integration).

The status is, 7.x-2.x highcharts.module (API) is very stable. However 7.x-2.x highcharts_views.module (Views integration) is still in development toward an initial release.

Thanks for reporting this notice (it's a trivial fix), but this notice is not causing your chart not displaying field content.

I can tell you that the charts do display data properly in the dev branch currently, but it must be done differently depending on your use case. For an explanation of where Views UI configurations for various use cases are at see point 4 in comment 3 on #1674928-3: Allow full use of Highcharts library Options in Views. This is something we are identifying - and when generally useful cases are identified - if we can find a good way to abstract them, these can be added to the the settingsForm() for each template class. So this is to say, if you can give feedback on your use case(s) in that issue, it could help get your needs into the appropriate chart template settings form :)

A note about expectations: The dev branch is for people who want to help test, but I would not use highcharts_views.module for anything other than that for now. You probably want to follow #1674928: Allow full use of Highcharts library Options in Views to stay up to date with progress.

Regarding where to start with configuring highcharts_views.module, you probably want to follow #1992670: Document Highcharts Views integration, which is postponed until #1674928 is ready.

scottrigby’s picture

Development note for tracking down this notice:

The ViewsHighchartsOptions extension classes should currently only be called by highcharts_views_plugin_style_highcharts::loadChartTemplate, which is only called by highcharts_views_plugin_style_highcharts::render. By that time, the settingsForm for the selected chart template should have been saved by highcharts_views_plugin_style_highcharts::options_form via getChartTemplateSettingsForm to $view->style_plugin->options['format'][TEMPLATE_CLASS]. ViewsHighchartsOptions::settingsForm is also an abstract (required) method, so even if a template's settingsForm is empty, the index in that array should be defined during __construct().

This was all a kind of gymnastics in order to get dynamically loaded settings per template. Will look into the notice more to see why it might be showing up.

scottrigby’s picture

Priority: Major » Normal
scottrigby’s picture

Actually this is also called when initially retrieving each template's settings form in highcharts_views_plugin_style_highcharts::getChartTemplateSettingsForm. This should probably be refactored. Something like adding ViewsHighchartsOptions::setFormDefaults rather than doing this on __construct().

scottrigby’s picture

Status: Active » Needs review
StatusFileSize
new5.3 KB

Out of curiosity, does this solve your problem? I can make the patch but can't test this weekend.
Also, if you can list steps you took to get this notice that would be helpful.

scottrigby’s picture

Nope. Let me think more on this one.

scottrigby’s picture

Status: Needs review » Needs work
MickC’s picture

Issue summary: View changes

Would be great to see this working - I just tried Charts and Visualisation, but only basic usage of Highcharts.

This module has the potential to specialise and get more flexibility and charting options.

What's the outlook on views integration issues?