I get array of date from json as 1420185600000,1420531200000,1420617600000,1420704000000,1420790400000,1420876800000. How do I format it to show the correct date in the XAxis labels of the highcharts?
相关问题
- Date with SimpleDateFormat in Java
- VBA local timezone adjustment
- Issues using highcharts node export server from Cl
- How do you use java stream api to convert list of
- JSpinner.DateEditor in Java Not Respecting TimeZon
相关文章
- Change color of bars depending on value in Highcha
- MYSQL: How can I find 'last monday's date&
- Calculate number of working days in a month [dupli
- Get file created date in node
- Changing Highcharts data series type dynamically
- Temporal Extraction (i.e. Extract date/time entiti
- Postgres String to Date EXAMPLE 10Apr77 to 10/04/1
- Date format conversion in JavaScript
You need to tell highcharts that the xAxis is a date
type
.You may need extra formatting if you want the date displayed in some form other than the default. That can be done via the
labels.formatter
.Sample code that lets you do what you want (minus what formatting you want your date in):
You would then need to determine what parts of your new date string you actually want to show. The sample above doing
return Date(this.value)
is the kitchen sink approach.UPDATE: If you want the strings formatted, Highcharts gives you functions to set up the date string. See this fiddle (same as fiddle linked in the comments below with formatter using highcharts): http://jsfiddle.net/CaptainBli/psd3ngsh/13/