score:1
First off, I know NOTHING about highcharts, but it would seem you need: (from your actual page)
function drawDefaultChart() {
$("#container").empty();
chart = new Highcharts.Chart(defaultOptions);
}
to be
function drawDefaultChart() {
$("#container").empty().highcharts(defaultOptions);
}
OR perhaps:
function drawDefaultChart() {
$("#container").highcharts(defaultOptions);
}
score:6
Always it's recommend to refer API documentation.
use following snippet to destroy the chart $('#container').highcharts().destroy();
Click here for a working solution.
Source: stackoverflow.com
Related Query
- Why isn't my highcharts chart getting reset/destroyed properly?
- Why my column chart is getting cropped in highcharts
- Column rang chart is not getting reset when click on legends in highcharts
- Highcharts => Getting the id of a point when clicking on a line chart
- Highcharts chart click event fired on click of the reset zoom button (bug?)
- creating a bar chart using Highcharts with React - getting an error that rendering div isn't found
- Highcharts - Getting a 3d effect with selected pie chart slices
- Getting coordinates of chart on selecting plot in highcharts
- HighCharts Stock Chart error code 18
- Why won't my HighCharts chart render?
- Why is the first label on highcharts bar chart missing?
- Why do I have the issue 'property assigment expected' when I want to display a chart on my web page using highcharts
- Highcharts Line Chart Drill down not working properly
- Highcharts - Getting chart on click event
- Highcharts display label for pie chart using html table as data source
- HighCharts line series not displaying properly with stacked bar combo chart
- highcharts tooltip not working properly for hacked gantt chart
- HighCharts - Getting chart to display - Simple example (markit API)
- Reset data in stacked chart in highcharts
- Highcharts polar chart not connecting lines properly
- Why code of Horizonal line(y-axis) on a single in Highcharts get applied to all other charts integrated with Webdatarocks
- Why does highcharts sankey chart sometimes combine multiple nodes with same node name but different Id into one and hide the lines?
- Why aren’t those 2 HighCharts codes equivalent? (Or is there a way to modify a call to legendItemClick after the creation of the chart object?)
- Highcharts areaspline, not getting the default color for chart
- Highcharts cloud issue with data source when duplicating chart
- Display of plotted point labels not appearing properly on X Range Chart for the first date of month - Highcharts
- Highcharts column chart extends off container and doesn't properly show X axis
- Getting numbers on Y-axis to show up as percentages with code from a Highcharts code generator tool?
- Why doesn't highcharts refresh this chart correctly?
- Why is Highcharts x axis not respecting my categories in stacked area chart
More Query from same tag
- Master - Detail Char in Sencha ExtJS 4.0
- Display data from CSV in Highcharts with Angular
- Drag Two points at same time with single action
- Issue with highcharts on jsfiddle where series is not being removed on drillup
- Highcharts two date compare
- Highcharts: setOptions for two different series of charts?
- Rename legend on export in highchart
- Highcharts data label getting cut off
- How to grab correct highchart number in selectors using Selenium Webdriver with Python with several charts on the page?
- HighCharts wrong xAxis label
- Highcharts add "expected" value
- Highchart library and responsive design
- Datatime from CSV file to plot in Highstock JS error
- how do you convert epoch to readable date format in javascript
- Loading Highcharts from MySQL using Java
- EmberJS Component With Graph
- Custom buttons on Highstock not enabled
- Highcarts bar legend symbol alignment to the label
- How to modify Column stacked percent Chart in Highcharts
- How to pass this three inputs (lineEdit, startDate, endDate) to my function (graphdata)
- How to add background color on highchart based on flag?
- Highcharts addSeries not showing line
- Highcharts pie charts can have url links
- Set minRange in Highcharts at week, but doesn't work
- Highcharts cut my series - transform bad position
- HighCharts. How to set a fixed width for a chart grid, not including labels?
- Highcharts plotOptions.pie.dataLabels.formatter gets called multiple times for same data
- Highcharts Label redraw
- Highcharts stickyTracking
- Update highstock chart dynamically