2

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.

123432198765
  • 276
  • 3
  • 14

2 Answers2

-1

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.

Swishy
  • 44
  • 5
  • I would rather avoid that. Because it's supposed to be a zoomed out view of all the months together and show progress over time. – 123432198765 Mar 26 '22 at 19:58
-1

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.

Deep Gandhi
  • 157
  • 1
  • 4
  • 13