score:-1
The problem is setExtremes(min, max)
method returns undefined
, so you can not chain options. Solution is to wrap this method and pass on context, for example:
(function(H) {
H.wrap(H.Axis.prototype, 'setExtremes', function (proceed) {
proceed.apply(this, Array.prototype.slice.call(arguments, 1);
return this; // <-- context for chaining
});
})(Highcharts);
Now we can use:
return window.Highcharts.charts[0].xAxis[0].setExtremes(min, max).series[0].options.data;
Note: The snippet can be placed in a separate file and used like any other Highcharts plugin (simply load after Highcharts library).
Important
Axis object has references only to series that are bound to this axis. If you want to access any series on the chart use:
return window.Highcharts.charts[0].xAxis[0].setExtremes(min, max).chart.series[0].options.data;
score:1
I am trying to execute your code on Highcharts demo page
The problem is with xAxis[0]
, xAxis
is not an array but a dictionary, so you must supply a string value there inside those []
.
check xAxis
in the docs
I am guessing you're looking for xAxis.events.setExtremes
Edit
I see now that xAxis can be an array, but you're most likely missing those events
so my solution should be changed to xAxis[0].events.setExtremes
Source: stackoverflow.com
Related Query
- Python: Read data from Highcharts after setExtreme
- Highcharts read data from XML throught attributes
- Read data from Highcharts
- Highcharts SVG Export from Python Server Side Code
- "TypeError: Cannot read property 'pos' of undefined" after deleting data from chart
- Send data from Python backend to Highcharts while escaping quotes for date
- Highcharts displays series names but missing data points from json source
- Proper way to remove all series data from a highcharts chart?
- Get Highcharts Series Data after Load
- Change Highcharts tooltip formatter from chart Object , after chart is rendered
- Scraping data from Highcharts using selenium
- Send JSON data to highcharts pie from asp.net MVC controller in C#
- Converting svg from Highcharts data into data points
- Add dynamic data to line chart from mysql database with highcharts
- How can i change highcharts data values by selecting from a dropdown list
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts - Global configuration with common code and unique data & Headings
- How to populate a Highcharts axis with string formatted data from a PHP array
- Highcharts not showing tooltip after update from null
- load data in highcharts from 2 different csv files
- Highcharts bargraph from json data in angularJS
- Passing data from db into Highcharts in Rails 3.x
- Highcharts - set yAxis.max to max value from data
- HighCharts navigator to keep range after async data load. (LazyLoad)
- Loading data from API into a highcharts vue component
- Highcharts visualizes chart data incorrectly after zooming or using the navigator
- passing data from database to highcharts in Django
- Formatting JSON from a Pandas data frame for Highcharts within a Django template
- Highcharts get data from database
- Getting a django view python dict into highcharts series data
More Query from same tag
- How do I calculate the total Data values for both and display in Legend
- Highcharts / HighStock - How to parse JSON correctly
- Highchartjs SubPlots not correctly stacked
- How to overcome missing values in Highstock-Stockchart?
- High Charts Multiple Line Chart not displaying tooltip for multiple lines
- Highchart.js secondary axis not showing on the opposite side
- Passing data from db into Highcharts in Rails 3.x
- Highcharts align data label based on positive / negative value
- How would I convert this array to this json format
- High Charts - area chart with gradient & threshold
- how do i remove the decimal point values from the array values?
- How to display HighCharts with tables
- Symfony KNP Snappy Bundle: The process has been signaled with signal "11"
- Highcharts Error #18 in - Highcharts.Chart(options)
- Set highcharts datalabel as dropdown list
- No graph displayed using Highcharts
- x-Values Data not showing in Highcharts, Javascript
- To create piechart in highcharts
- How to change rCharts Highchart Color based on Factor Variable
- highcharter custom animation
- Highcharts - Scatter chart with a line connecting the dots in the series
- Extend Highcharts Export
- bubble/circle getting escaped in xaxis in Highchart Bubble graph
- How to use Highmaps and Highcharts with Meteor?
- Draw Line in Bar with negative stack in HighCharts
- Draw multiple series in Highchart from single JSON data container
- HighCharts performance issue and alternative
- highcharts draw datetime a week earlier
- Highcharts not displaying chart from csv file
- How to set tooltip background as point color for split chart in Highcharts?