score:7
I see three questions in your case:
1) To get object when creating chart, you have two ways:
with jQuery:
var chart = $(element).highcharts('StockChart', options).highcharts();
without jQuery:
var chart = new Highcharts.StockChart(options);
2) Error #17:
"The requested series type does not exist"
Is caused by type : 'StockChart'
. type
is reserved for a series type. As @Raeen Hashemi said, to create Highstock, use different constructor: new Highcharts.StockChart(options)
.
3) Yes, you can pass an object to renderTo
: http://jsfiddle.net/yvxwa6oq/
new Highcharts.StockChart({
chart: {
renderTo: document.getElementsByClassName("container")[0]
},
series: [{
name: 'USD to EUR',
data: [10, 20]
}]
});
4) this
- honestly, I'm not sure why you need access to this
somewhere else than event handlers. Instead use Highcharts.charts[index]
or stored variables like chart
or $(element).highcharts()
score:0
for ES6, use it in below method.
import * as Highcharts from "highcharts";
import * as highchartsTree from 'highcharts/modules/treemap';
also, any highchart type can be added instead of treemap
highchartsTree(Highcharts);
Source: stackoverflow.com
Related Query
- highcharts, highstock without jQuery
- Highcharts / Highstock step line without vertical "transition" lines?
- how to display 2 same highcharts without duplicate the code
- Highcharts with angularjs without jquery
- AngularJS With Highcharts WITHOUT JQuery
- Strange character in the Highstock source code
- HTML table as data source for highstock charts using highcharts
- highcharts without jQuery and JSPM
- How to have multiple highcharts with different series data in vuejs without repeating code
- Highcharts Sparkline in reactjs without Jquery
- Highcharts in JQuery Tabs - Resizing hidden tab code stops resizing visible tab
- Dynamically changing Highcharts Theme through Jquery code not working
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- Highcharts donut chart without inner pie?
- Highstock highcharts irregular data gets wrong x-scale
- Hiding a Highcharts series without using the legend
- Highcharts jQuery rendering problem - all browsers
- Rounding results in highcharts jquery script
- Loading Highcharts via shim using RequireJS and maintaining jQuery dependency
- jQuery UI Tabs and Highcharts display/rendering issue
- Highcharts / jQuery - destroy and rebuild chart with original options
- Highcharts - Force Categories in x-axis to be shown, even without data
- highcharts jquery dynamic change chart type column to bar
- How to get series's id in Highcharts / Highstock
- jQuery datepicker with Highstocks / Highcharts
- jquery calling highcharts generating error 17
- Highcharts in AngularJs without jQuery?
- Loading Highcharts series from XML using jQuery
- How to change axis label size when exporting in Highcharts / Highstock
- Setting Highcharts maximum Y value to an exact amount without rounding
More Query from same tag
- Highcharts Column Chart number LOW but column looks HIGH
- Highcharts 5: TypeError: Cannot read property 'chart' of undefined at e.Chart.reflow
- Highcharts not displaying column chart
- Highcharts: what is my chart not zoomable?
- Create Line in Highcharts with start and end point
- Print datatable and Chart using Typescript
- Export data from highcharts in csv file with dates in milliseconds
- Can we show the text in bar of timeline chart?
- Excel charting to JavaScript
- Highmaps mix Bubble map and maplines causes map offset
- Bell Curve with django is not working
- Pie Charts with advanced design
- Yii2 How to pass php array data into highcharts
- Dynamically update area.stacking from normal to null using highchart-ng
- How to make multiple charts using highcharts in a loop?
- Highcharts - How to show two tooltips for single point at different positions of chart?
- High Charts show series maximums below chart
- Highcharts Synchronized charts
- HighCharts. How to set a fixed width for a chart grid, not including labels?
- Highchart Date time interval in x-Axis
- Highcharts sticky labels for big values goes out of chart
- Algorithm for group scales
- HighCharts/Maps: How to display values lower than a certain value appear different from the rest of the graphic?
- Highcharts pie color of a part when i click on this
- HighChart Chart displaying incorrect data when switched to StockChart
- highcharts inside datatables editor form? (Object [object Object] has no method 'highcharts')
- Highcharts - Multiple Subtitle (2)
- How to do a data overlap independently column in Highcharts
- Highstock panning asynchronously loading data
- How to provide padding to the tickPosition on highchart?