QingWei-Li / laue

🖖📈 Modern charts for Vue 2.0
https://laue.js.org
MIT License
263 stars 34 forks source link

Is it possible to limit la-x/y-axis text labels for large sets of data? #10

Closed zillazillazilla closed 6 years ago

zillazillazilla commented 6 years ago

image

Sorry, me again! :sweat_smile:

Taking this 365 day example with 365 points of data for the line, x axis labels and y axis labels, is there a way of setting a x/y label limits so the chart is still readable?

Overly simple example 5 labels maximum <la-y-axis :limit="5" prop="labelData"></la-y-axis> Bottom and top values can be equal to the :bound or lowest/highest value in prop. The final 3 labels are divided equally in the remainder of the Y axis.

So if :bound[30, 300] then the y axis text would appear as...

300 -

232.5 -

165 -

97.5 -

30 -

on a side note I have checked the API at https://laue.js.org/api/#yaxis and I wonder if <la-y-axis tickSize="10" prop="labelData"></la-y-axis> is what I am looking for, but neither that nor <la-y-axis :tickSize="10" prop="labelData"></la-y-axis> seems to alter the axis at all (neither does fontSize).

Either I am missing something again due to using a basic implementation or the docs might need a little more love to help beginners use laue fully.

QingWei-Li commented 6 years ago

Released v0.1.1

https://laue.js.org/examples/#large-data