You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by Richardson Petitbrun <ri...@gmail.com> on 2022/03/29 13:37:26 UTC
Tabs in echarts
How would I program to have tabs show up for different datasets for example 1D, 5D, 1M, 6M, 1Y, 5Y, Max. Similarly to that seen in the stock market historical chart?
Is there a code you can share?
Thank you.
Re: Tabs in echarts
Posted by Ovilia <ov...@gmail.com>.
Hi,
If you wish to implement this, you need a xAxis with type 'value'. If the x
values are in seconds, then set `interval` to be 3600*24 for 1D. Call
`setOption` when users click on the tabs. The tabs should be implemented
using DOM.
There are two options to control how many labels are in an axis. `interval`
gives a precise control while `splitNumber` gives a recommendation. In your
case, `interval` should be used.
Thanks
*Ovilia*
On Wed, Mar 30, 2022 at 11:20 AM Richardson Petitbrun <ri...@gmail.com>
wrote:
> How would I program to have tabs show up for different datasets for
> example 1D, 5D, 1M, 6M, 1Y, 5Y, Max. Similarly to that seen in the stock
> market historical chart?
>
> Is there a code you can share?
>
> Thank you.
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
> For additional commands, e-mail: dev-help@echarts.apache.org