score:1
Accepted answer
You don't need to call
redraw
aftersetData
:function update_chart2(xmin, xmax) { ... chart2.series[0].setData(new_data); // chart2.redraw(); - redraw is called in setData }
You can update
xAxis
with plot-band options instead of removing and adding it.events: { selection: function (event) { ... if (event.xAxis) { xmin = event.xAxis[0].min; xmax = event.xAxis[0].max; this.xAxis[0].update( { plotBands: [ { from: xmin, to: xmax } ] }, false ); } update_chart2(Math.floor(xmin) + 1, Math.floor(xmax) + 1); }, ... }
API Reference:
https://api.highcharts.com/class-reference/Highcharts.Series#setData
https://api.highcharts.com/class-reference/Highcharts.Axis#update
Source: stackoverflow.com
Related Query
- Highcharts Interactivity between plots - looking for code improvements
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts display label for pie chart using html table as data source
- Simple, Open source PHP wrapper for Highcharts library
- How to hide series name from tooltip in Highcharts scatter plots for linear regression
- HTML table as data source for highstock charts using highcharts
- Including source for Alchemy js breaks Highcharts js
- Looking for a line chart drill down to area chart using Highcharts
- Using a flask variable as data source for highcharts
- Error: Data source must be a URL for refresh | console error | javascript | Highcharts
- Use Node.js as data source for highcharts
- Looking for special Highcharts chart
- HighCharts turn animation false for line chart
- set different colors for each column in highcharts
- How to make highcharts default to 0 for missing data
- What format does the highcharts js library accept for dates?
- Changing data dynamically for a series in Highcharts
- Add additional data to a Highcharts series for use in formatters
- Highcharts text labels for y-axis
- Displaying percentage inside pie item for highcharts
- Display tooltip for invisible series in Highcharts
- Highcharts percentage of total for simple bar chart
- Adding thousands separator for custom formatted highcharts tooltip
- Improve highcharts performance for large amounts of data
- Highcharts - remove times between dates on a datetime xaxis type
- Highcharts - How to set custom colors for the series
- Highcharts - set maximum range for yAxis but keep axis dynamic within that range
- HighCharts API for Deprecated Versions
- Highcharts graph X-axis label for different date ranges
- highcharts customize tooltip for a single point
More Query from same tag
- Nodata message with React 0.13.3 and react-highcharts 3.0.0
- Synchronized HighChart: Uncaught TypeError: $(...).appendTo(...).highcharts is not a function
- Highcharts in Angular - accessing the API
- highcharts piechart redraw with animation after setData()
- Highchart - show values on Chart
- how to solve highstocks error #15
- Tooltip help in HighCharts Column chart
- High chart animation lag after it moves from viewport
- dynamically apply timezone offset to a highchart
- The RTL language (Arabic) is not working with HighCharts pie chart correctly, how can I fix this?
- Minor change cause HighStock charts syncing to fail
- Jquery: Dynamic binding events on a Highcharts object
- Fetching all the Project Name for a Project Cumulative Flow Chart in Rally
- How make to fill space after column was hidden in column chart using highchart?
- Highcharts plot offset on line graph with categories
- Highcharts overflowing parent div Angular
- Sending javascript function with JSON is possible?
- Possible to force Highcarts to use the circle symbol for all the series in a line graph?
- Highstock data points pixel spacing
- Is there a better way to debug HighCharts issues
- How can I force multiple y-axis in Highcharts to have a common zero
- Why is the legend of my HighChart PieChart behaving irradically, when I update my series data?
- highcharts: bubble charts: can I render the bubbles higher, not centered?
- Highcharts Date Time With Irregular Intervals Down to Minutes
- How to get/set highcharts xAxis step?
- How to add a newline to a Highchart tooltip?
- something wrong in presenting highcharts using django
- Highcharts Get legend "icon" in tooltip
- Highcharts Maps - Rounded zoom buttons
- Highcharts datepicker - multiple series