score:0
You can programmatically zoom into the required time range using the Axis.setExtremes method. In your case you may want to do it on load
Here is how you would do it, if you want to zoom into the 1st 15 days of the given data, you can easily modify to zoom into last 15 days.
function zoomTo15Points(chart){
var points=chart.series[0].points;
if(points.length<15) return;
var min=points[0].x;
var max=points[14].x;
// If you wish to zoom to 15 days and not 15 points, you can modify max as
// var max=min + 1000*60*60*24*14
chart.xAxis[0].setExtremes(min,max);
chart.showResetZoom();
}
If you do not want to let the user zoom out, you can disable the last line, but you also will have to disable zooming, else the button would appear if user zooms inside the 15 days.
score:0
You can try dataGrouping feature of highStock
var dataGrouping = {
groupPixelWidth: 40,
units: [[
'day',
[1, 2, 3,4,5,6]
]]
};
Highcharts would make sure all your columns are at least the specified width (40), if the number of coulmns is large, such that it's not possible to have that width, it will group data using the units, so it will group data of 1 day into 1 column or 2 days into 1 column and so on. Not sure if you really want exactly 15 plots, but I think you concern was to avoid crowding of data, this does exactly that, but the number of columns will vary based on the width you specify, the width of the plotArea and allowed units and its multiples. Tweak the values as per your data and width of your chart. jsFiddle
Source: stackoverflow.com
Related Query
- Highchart js max 15 plots to be plotted
- How to get Highchart plots plotted only for starting and ending points
- adapting text to highchart tooltip max width
- Highchart axis max with multiple axes
- max Y Axis value in a Highchart
- Highchart donut pie - Is there a max number of slices
- HighChart plots not displaying correctly on small div
- How to use Highchart auto calculated min and max values, unless they are above or below a predefined min and max
- Highchart Renderer By min and max
- Highchart Axis with only min and max series value
- Setting Min and Max values for more than two Highchart Solid Gauges using function
- Highchart always show max value for y Axis
- Highchart min/max values doesn't set and chart not plotted properly
- How to get chart min and max values after Drag zooming in highChart chart?
- Strange character in the Highstock source code
- Why does my Highchart look different when I transfer my code from Jsfiddle to my server?
- I had follow someone code samples and try apply to my HighChart program but I can't get it work at all
- Highchart datetime graph x-axis unable to get data on plot when min and max is on
- How to sort order highchart pie jasperstudio by slice value min to max
- Highchart Min Max for y-axis per series
- Set min and max value in double for y-axis in highchart
- Column based Highchart drilldown series assign color code to each column
- x-axis, y-axis lines does not appear, when I include 3D chart library of HighChart in my code
- Highcharts Interactivity between plots - looking for code improvements
- Set HighChart yAxis's min max to a specific series only
- Setting max column amount in highchart column chart type
- Make dynamic Y-axis max value and tick interval of highchart using php
- Max & Min highchart line
- why my highchart code is not working?
- Highchart - Min max and Mean chart
More Query from same tag
- How to set Startofweek in highcharts api
- Config gauge series highchart
- Highcharts with inverted y-axis, but not inverted data?
- How to draw two series in the same chart that has different data time in xAxis
- Highcharts: highlighting line chart series on legend hover
- Highchart 5: Pie Drilldown labels and back button not visible
- Highstock navigator add drag-end event
- highcharts: yyy.animate doesn't work correctly when objects are replaced each other more than once
- Generate multiple charts based on json in angular 8
- HighCharts - making a Pie with MySQL and PHP
- Plotting 75000 points on a rich Scatter Chart with Tooltips
- Highcharts - Scatter plot single series with multicolor plots (points)
- How to display months in x axis labels in highcharts
- Multiple pie-charts in the same chart with HighCharts
- React plot options onclick event
- Set tooltip dynamically in HIGHCHARTS
- Is angular2-highcharts paid ? Can i use it for my Client?
- Scientific notation to decimal notation not working in highcharts
- Highcharts with dynamic yaxis labels as strings
- Highcharts How to find legend co-ordinates
- Highcharts Credits itemStyle not working
- HighChart.js data source recommendations
- Show tooltips on all points of vertical line
- Highchart from select rows in HTML table
- how do i redraw only the Highchart with new API that depends on my Select Option Parameter?
- How to add apostrophe in front of an integer on x-axis label in Highcharts?
- highstock ie8 error
- Highchart multi axes labels not showing
- Give the columnrange different colors
- How to add right side legend to US highcharts map that shows eastern states names?