Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Support non-linear X Axis values

Open dctr opened this issue 11 years ago • 4 comments

I get x/y value pairs, which might not have same distance between the x values. Think of timestamps or maybe weekdays, e.g.:

[1, 5], [2, 9], [4, 3], [5, 5]
=> in Chart.js =>
labels = ["1", "2", "4", "5"]
data = [5, 9, 3, 5]

where x=3 is missing.

The displayed result should allow, that the distance between the second (x=2) and the third (x=4) measure point can be double the distance as between the other values.

dctr avatar Sep 01 '15 12:09 dctr

This is now possible with either the linear scale or the time scale in v2.0-dev. See Samples for reference

tannerlinsley avatar Sep 22 '15 06:09 tannerlinsley

@dctr did you ever find documentation or examples of how to do this? I'm looking at the samples recommended by @tannerlinsley and I can't find anything 🤔

heyitscoco avatar Jan 30 '19 22:01 heyitscoco

Thas was years ago, haha. Haven't dealt with chart.js since then.

dctr avatar Jan 30 '19 22:01 dctr

Yeah, I figured it was a long shot 🤷🏾‍♀️Thanks anyway!

heyitscoco avatar Jan 30 '19 23:01 heyitscoco