Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X Axis labels overlapping #66

Closed
srijaljoshi opened this issue May 4, 2021 · 3 comments
Closed

X Axis labels overlapping #66

srijaljoshi opened this issue May 4, 2021 · 3 comments

Comments

@srijaljoshi
Copy link

What would be the best solution to fit everything? The data I'm using has 12 data points with time increment of 5 mins. Is there a way to tilt the labels or use only a few labels out of the 12 spread out in the x-axis?

xAxisLables

@willdale
Copy link
Owner

willdale commented May 5, 2021

In MultiLineChartData:

LineChartStyle(...
               xAxisLabelsFrom: .dataPoint(rotation: .degrees(90)), 
               ...

in an update hopefully soon there is an overhaul of label rotation.

OR

In ChartData:

MultiLineChartData(...
                   xAxisLabels: ["January", "December"],
                   chartStyle: LineChartStyle(...
                                              xAxisLabelsFrom: .chartData(rotation: .degrees(0)), 
                                              ...
                   ...

@srijaljoshi
Copy link
Author

Thanks. That really helped.
Is there a way to sample a few x-axis labels and display them when there are like 100+ points?

@willdale
Copy link
Owner

willdale commented May 5, 2021

The library doesn't do any of the filtering, that needs to be done before. However if only some data points have xAxisLabels then the library will still place the others in the right position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants