2
votes

Am trying to plot spline graph for the no of passed/failed testcases and grouping them based on hour/date/month/year and I am getting this value as irregular series (i.e) if its hours, datas won't be available for all 24 hours. Its the same case for other groupings. As the datas are irregular need the x-axis tick interval to be month vice, Have tried using the dateTimeLabelFormats, It didn't help me much as its only formats the label.

All i need is the tickInterval needs to be month vice and both date&time in tooltip.

Sorry that i won't be able to post data/fiddle as am using this HighCharts in an BI tool(SpagoBI) and it requires templates.

Thanks in advance.

5
can you show what have you tried so far? - SPandya
Have tried using the both dateTimeLableFormats to format the HOUR and tickInterval, but not met my requirement - Fidel
can you post your code along with the json? - SPandya
Am using BI tool SpagoBI, so it requires only templates and DS, So i dont have datas in json format. Am pasting my Dataset below. [{45, 0, 1388082600000},{57, 1, 1388082600000},{30, 0, 1387996200000},{78, 0, 1387996200000},{33, 0, 1387996200000}] - Fidel
As per my knowledge you need to have json. - SPandya

5 Answers

3
votes

I simply used a minTickInterval of 28 days to account for short Feb months. The tickIntervals automatically adjust to 1 month.

xAxis: {
  type: 'datetime',
  minTickInterval: 28*24*3600*1000
}

Works great for me.

2
votes

Try the following, setting ordinal false fixes the time intervals and not changed for best visualization.

xAxis: {
    type: 'datetime',
    minTickInterval: 3600*24*30*1000,//time in milliseconds
    minRange: 3600*24*30*1000,
    ordinal: false //this sets the fixed time formats                        
},
1
votes

I think the problem is in the data that you are passing in javascript.

Before going further check this Preprocessing Data for highchart link and make sure you are doing it in right way

0
votes

You need to have sorted data via x ascending, as I see you have incorrect format of that. In case when you need to customise tooltip content or label on axis, you can use formatter.

Tooltip formatter

Label formatter

Date format

-1
votes

What I did was subtracting the date format for month which is m-1. If you have Y,m,d change to Y,m-1,d

This is from php to js