score:3
Accepted answer
your date in json
should be string. this date should be converted to millisecond.
var json = [{
name: "maintenance",
data: [
['2017-06-26', 1.5],
['2017-07-03', 5.2],
['2017-07-10', 1.65],
['2017-07-17', 2.5],
['2017-07-24', 1.5]
]
}, {
name: "others",
data: [
['2017-06-26', 1.5],
['2017-07-03', 1.5],
['2017-07-10', 1.5],
['2017-07-17', 1.25],
['2017-07-24', 1.5]
]
}, {
name: "project",
data: [
['2017-06-26', 6.5],
['2017-07-03', 6.1],
['2017-07-10', 6.7],
['2017-07-17', 7],
['2017-07-24', 6.5]
]
}, {
name: "training",
data: [
['2017-06-26', 0],
['2017-07-03', 0.75],
['2017-07-10', 1.9],
['2017-07-17', 0.5],
['2017-07-24', 1]
]
}, {
name: "day-off",
data: [
['2017-06-26', 0],
['2017-07-03', 0],
['2017-07-10', 0],
['2017-07-17', 0],
['2017-07-24', 1]
]
}];
//updating jsons date to millisecond
object.keys(json).map(function(key, index) {
json[key].data.map(function(value, keys, index) {
json[key].data[keys][0]=new date(value[0]).gettime()
})
});
//console.log(json)
score:0
first of all, you have made a mistake in your demo. instead of data: json
it should be series: json
. secondly, put your dates inside of strings, otherwise they will be treated as numbers (e.g. 2017 - 06 - 26 = 1985).
example:
http://jsfiddle.net/3yumsp8m/
Source: stackoverflow.com
Related Query
- Plot Highchart multiple series line chart using JSON data
- Highchart Line chart – data series with multiple axis - 2nd series placed in the middle of X axis
- HighChart : plot line click event for multiple chart
- How could you supply multiple series to a line chart in R shiny using highcharter package and without hardcoding the series?
- Basic Highcharts Multiple Series Chart Using JSON
- How to add a vertical plot line in multiple line series and show the tooltip on Plot line in highchart
- How to plot line chart with series data in highcharts?
- How to plot multiple lines in a single graph using HighChart with JSON
- Highcharts : using same div to load a chart multiple times with different series data
- Counting json data to create dynamic series in highchart line charts
- Set Color for Pie Chart using HighChart + JSON data
- Build a highchart chart using data from an external JSON
- Highcharts Highstock How to Plot OHLC and Line Charts from One Set of Embedded CSV Data Using Series Map Tools?
- How can i set the json encode result to the highchart series data using getJSON
- How do I show multiple line from dynamic data using javascript in highchart
- Produce highcharts multiple line chart from JSON / MySQL data
- Is there a solution to plot 3D multiple time line series in web application using highcharts or any other libraries
- Draw multiple series in Highchart from single JSON data container
- Highcharts: create multiple series grouped my month and year using JSON data
- Highcharts: create multiple series using JSON data
- highchart activity gauge chart using json data from a file
- json in multiple pie chart using Highchart
- highchart bar using json with series and xAxis data
- Load mysql data to Highcharts line chart using JSON
- Highchart Callback Refactoring not working, and how to display multiple series using multiple Ajax data
- Plot Highchart Gauge with JSON Data
- Highcharts with JSON data and multiple series
- create a donut chart using highchart using jquery json object
- Adding data to a highchart chart using an array with IDs
- Correct format of using csv data to plot highchart
More Query from same tag
- HighCharts Dynamically Change Chart Type
- Highcharts screen fitting issue
- can hightcharts make ajax calls to external data files?
- Creating depth chart using highcharts and creating bids and asks in such a way that bids and asks are created from center of chart
- Change highstock chart zones on click yAxis
- How to web scraping Highcharts values?
- Why I cant put the highcharts.chart in render?
- in highchart, how to control space between legend and charting area
- Highcharts Datalabel formatting in spline
- Highcharts warning: Invalid attribute 'src' in config
- Is it possible to load tooltip with external data with React-Native-HighCharts?
- Highcharts scatter plot with time only
- Highcharts- how to get focus only when the cursor enter the point?
- Specific case of Timeline chart
- Highcharts3 change symbol color(symbolStroke) for export button on hover
- How to give proper number denominations in highcharts buuble chart
- How to get Pie Chart data to display using AppCoda example and iOS Charts?
- Highcharts - How to hide the last category tick label on xAxis with scrollbar
- Loading multiple Highcharts with jquery.load
- Highcharts tickinterval set to one minute shows only one date
- Highcharts sankey. Highlight all paths of a given category
- High chart problwm with multiple axes with dynamic data
- Why is Highcharts x axis not respecting my categories in stacked area chart
- highcharts, highstock without jQuery
- Putting the data in the designated date in highcharts
- css clip-path source url gets change while using in solution
- How to add custom map and custom data to Highmaps?
- individual point settings in a scatter/line plot
- Highstock - Tooltip doesn't work correctly with Range Selector
- Highcharts - Toggling the lines that run parallel to X axis for each value on Y axis?