score:10
Here are some references that should help you out.
Also created a sample jsfiddle to help you start out.
xAxis
xAxis: {
type: "datetime",
dateTimeLabelFormats: {
day: '%m-%d'
},
tickInterval: 24 * 3600 * 1000,
min: Date.UTC(<?php echo $date_from;?>),
max: Date.UTC(<?php echo $date_to;?>)
}
Basically, what this does is set the type of xAxis to 'datetime' so the tickInterval
understands that's it is incrementing by 86400000 milliseconds
, and also set the format of the xAxis based on the required date format.
Then the $date_from
and $date_to
should look like this from PHP
handling the form submission.
$date_from = date("Y, m, d",strtotime($_POST['from']) - 2*86400);
$date_to = date("Y, m, d",strtotime($_POST['to']) + 2*86400);
Source: stackoverflow.com
Related Query
- Populate Highcharts X-Axis With Dates Given a From And To Date
- How to populate a Highcharts axis with string formatted data from a PHP array
- Highcharts - How to populate date with Mysql and PHP?
- How to display all dates with a given Start Date and End Date even if there is no data?
- HIGHCHARTS - Given a series with UNIX stamps and values pairs for the data, how do I show only the date for the first and last point on xAxis?
- Highcharts with date and time for x axis (from a database with format YYYYMMDDHHMM)
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Highcharts blank chart with x and y axis
- Highcharts - Global configuration with common code and unique data & Headings
- Highcharts with 2 series and 2 compare dates
- Is it possible to have two Y Axis in a highstock chart from highcharts one on the left and another on the right?
- how to show column and area charts with different y axis with same category and same x axis in highcharts
- Highcharts multiple x axis and yaxis. The width of the 1st x-axis is not in sync with browser resize
- Highchart : by passing FROM DATE and TO DATE x axis labels should set
- HighCharts populate Pie Chart with data from SQL Database
- how to show if no result given date range and 0 result with django annotate?
- Prevent from executing previous JavaScript with turbolinks and highcharts //LazyHighCharts
- Displaying date on the x axis with Highcharts using ASP.NET MVC
- Highcharts with dual axis and stacking - R
- Highcharts displaying Date axis from milliseconds
- Highcharts to display area range and line chart with data from a CSV file
- how to make chart real time with 2 line and get data from php with highcharts
- Export data from highcharts in csv file with dates in milliseconds
- Display User info from Meteor.users, and display with Highcharts
- Highcharts series zone not working with UTC date value in x axis
- min and max axis value not respected in HighCharts chart with a logarithmic axis
- Getting numbers on Y-axis to show up as percentages with code from a Highcharts code generator tool?
- Highcharts treemap with drillnodes and color axis : do not display sub level colors in the main level
- how can I use rangeselector and navigation in highcharts in the given code
- Highcharts - Performance issue using chart with x values date and TIME
More Query from same tag
- How to enable dates that match with the data in rangeselector?
- How do I place the labels next to the series on a split packed bubble chart?
- Change SVG stroke options in Highcharts
- HighCharts: Resize markers of scatter chart dynamically
- To get the name of the series in bubble chart in highcharts
- Adding data to highcharts(Highstock) when user scrolling reaches left end
- Add a hyperlink to stockChart in highcharts
- How can I use getSVG() with react-highcharts?
- Save Highchart directly to specific path
- Is there a way to disable a legend item by default?
- Highcharts all js in one package
- Highcharts add point to line chart with json
- Unable to trigger a click event on series data | Highchart
- How to show additional data in tooltip of PIE Chart-Highcharts
- Highcharts ( stockchart series line is not connecting to the last point
- How to disable dragging of Highcharts annotations?
- Highchart series update in javascript
- Generate a highchart based on the output of an array
- Highcharts - animations other than the default
- highcharts getjson: why a "?" in callbackname?
- it is possible to style HIGHCHARTS like this?
- Draw plot bands between 2 points in x axis - Highcharts
- HighCharts: How to toggle yAxis options on browser resize?
- rCharts shows limited functionality when used with Shiny 0.8.0.99
- Highcharts. Make tooltip of a specific point always visible
- Highcharts Treemap
- Highcharts tooltip on click mailto
- Unable to manually set the intervals for Y axis
- Can I add custom data for highcharts RSI indicator?
- highcharts mouse over/out events fired in wrong timing