QingWei-Li / laue

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

Missing documentation for interval ? #16

Closed HugoHeneault closed 6 years ago

HugoHeneault commented 6 years ago

First of all, thanks a lot for this awesome lib! I love using it. 🎉

I'm trying to get la-y-axis works with :interval prop, but I don't understand how I should use it.

I tried with a simple :interval="1" or a bit more complex :interval="i => i === 0 || i % 1 === 0" to get only round values, but I'm not sure about how I should use it!

Here's an example: https://vuep.run/c8fa628b

With the results I get:

image

It might be related with https://github.com/QingWei-Li/laue/issues/11 but it might also be me not understanding how to use it?

Could you add a little more explanations on how to define the new :interval prop?

Thanks a lot! 👌

HugoHeneault commented 6 years ago

Ok so I've spent 2h and here's what I understood:

The interval function is used to know if a tick should be displayed for each different value, based on their index.

I'm trying to work on a solution where I could give a list of ticks but it might not be really nice as I don't understand yet how things work. 😂