c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.34k stars 1.39k forks source link

X-axis tick labels truncated at end #2773

Open JetForMe opened 4 years ago

JetForMe commented 4 years ago

See this chart for an example. I specify the ticks to show along the X-axis as

axis: {
    x: {
        label: { text: "Day", position: "outer-middle" },
        type: "timeseries",
        tick: { format: "%b-%d", values: [ new Date(2020, 0, 22), new Date(2020, 1, 1), new Date(2020, 1, 15), new Date(2020, 2, 1), new Date(2020, 2, 15), new Date(2020, 3, 1), new Date(2020, 3, 15), new Date(2020, 4, 1), new Date(2020, 4, 15), new Date(2020, 5, 1), new Date(2020, 5, 15), lastDate ] }
    },
}

It would be nice if C3 could adjust the position of the text label for the last tick on the right to show the full label, rather than truncating it off the right edge. Thanks!

ypresto commented 4 years ago

Perhaps dupe of #1128