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: show multiple days data on same chart making them overlpa each other to comparison
- Highcharts - Column width not responsive
- Multiple Series Timeline with HighCharts
- Highcharts problem with decimals if there are many data points
- Issues Getting Highcharts Export Server Running Under iisnode
- Highcharts donut separate tooltips for inner and outer pie
- Trying to update name and date in a highcharts column chart
- Displaying data ArrayList (EJB + Servlet + JSP(JSTL)) to JavaScript ArrayList
- Show average in highcharts graph as column
- How to integrate market depth chart using highchart?
- Population density and Circles (to represent earthquakes) on the same Map
- Highcharts funnel graph constructor
- Highcharts inactive state must be applied to all items except for hovered item
- Excel charting to JavaScript
- Highcharts: To rotate the chart 90 degree but also redraw it
- highstock strange behavior scrollbar
- Add data dynamicly with highcharts using reactjs
- How to get multiple series data in tooltip highcharts (Without loosing tooltip pointer arrow)
- Highcharts(highstock) line chart Tooltip shows previous date
- How to update Highchart from inside react a component?
- Highcharts Label Date Format
- How to set multiple colors in one series in highchart
- How to add a separate marker(an arrow) under a line
- Highcharts : Stacked barchart on hover change the opacity
- Ember.js , HighCharts - accessing JSON data from controller
- How to make this chart wider/ enable scrolling?
- How to suppress the bullet point and series name in Highmaps' tooltip?
- Highchart basic-line
- Highcharts - line chart dataLabels on every other point?
- How do I show multiple line from dynamic data using javascript in highchart