javascript - Chartjs, How to make x tick space be different on line chart -




i want use line chart , make such each x value maps it's respective y value based upon index. example know can this:

labels: [1,2,10,20] 

and have data be:

data: [1,2,3,20] 

which produce this: graph

as can see space between 2 , 10 same x axis labels. want insert labels/data using same format (data:[1,2...]) want x axis realize spacing between each value should scaled depending on x value given still mapped y value.

i know can insert data this:

data: [{          x: -10,          y: 0         }] 

but there way without having change format , have index based instead?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -