ChartsOrg / ChartsOrg/Charts

LineChart X-Axis - How To Always Display First & Last Label

Open
#2,006 23 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

In my Line Chart, I have it set up so that if there's only one data entry, I make the data point show up in the middle like this:

![screen shot 2016-12-25 at 7 00 36 pm](https://cloud.githubusercontent.com/assets/11897465/21473521/ab3aee12-cad4-11e6-83ed-bbbd4c9fe0cb.png)

If there's more data entries, it'll look more like this:

![screen shot 2016-12-25 at 7 00 50 pm](https://cloud.githubusercontent.com/assets/11897465/21473522/be28d412-cad4-11e6-9d78-1e69af6ae9da.png)

The problem I'm having is that the last label on the X-Axis is not showing up. This is data from the past 30 days, so I'd like the last label, Dec 25, to show up. Is there a way to make my Line Chart always display the first and last label on the X-Axis? I don't care how it computes or skips the labels in between.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.