I have multiple data points for each month: And I get the x-axis of my graph repeated like Feb Feb Feb Mar Mar Mar Mar
Each data point is important because it reflects how long something took them on that day. So I cannot just sum all the values for a month or something like that.
How do I fix this?
I currently have the granularity set to 1 for the xAxis but I don't quite understand how granularity works.
CodePudding user response:
Can you group your data, so that it is sum'd (or some other aggregate function) by month?
This would get your data to have one value per month, and therefore should solve the issue.
CodePudding user response:
add this:
xAxis.granularityEnabled = true
as per document it says:
/// When true, axis labels are controlled by the granularity
property.
/// When false, axis values could possibly be repeated.
/// This could happen if two adjacent axis values are rounded to same value.
/// If using granularity this could be avoided by having fewer axis values visible.