I test your extension on the yii2 advanced application template, i add "miloschuman/yii2-highcharts-widget": "*" in the require section of my composer.json file. Then i update with composer.
I insert the sample code in frontend/views/index.php by choosing the php arrays method but i have an error :
Class "miloschuman\highcharts\Highcharts" not found
Have you tried adding any other composer packages, and do you get the same error? If you haven’t already done so, check that your /vendor folder is in sync with your server.
Great widget. Had no problem getting it installed and rendering a nice looking multi-series line chart. One issue has me confounded, which is setting the width and height of my chart. I’ve tried wrapping the widget in a container div styled at width:100%, as suggested in the Highcharts docs, and I’ve also set the width and height option properties in the widget. No matter what I’ve tried, when I inspect the element I see that the highchairs-container style sets width at 600px and height at 400px. My 100% width container is just over 1100px wide so it’s not a constraint. I’m clearly doing something wrong. Any help will be greatly appreciated!
Milo, I just figured this out. I’d misread the Highcharts API Reference discussion on setting width and height. Once I’d clicked through to the JSFiddle example I realized my mistake. I was passing values as strings, e.g., ‘width’ => ‘1100px’ instead of the correct approach shown in the code excerpt below.
I’m trying to display a bar graph and I pass in an array (using SeriesDataHelper) that has 43 items. Only the first 20 show on the chart and I can’t for the life of me figure out why. I’ve tried setting plotOptions-bar-cropThreshold = 100 but that didn’t make any difference. Nor does changing the height/width of the chart.
I’ve confirmed in debugger that the dataProvider actual does have the 43 data points.
Hi Milo Schuman, i was using the extension highcharts, i haven’t problem with the charts until i used the type columnrange. I couldn’t make it work, the chart doesn’t display in the page. I’m working on the yii2 advanced application template. My code:
Fadex, the ‘columnrange’ chart type is defined in a separate file, ‘highcharts-more.js’, which you must include via the top-level [font=“Courier New”]scripts[/font] option, like this: