Jackodb / Visualization

Visualization using DASH/Plot.ly
0 stars 0 forks source link

Values on x-axis #3

Closed Jackodb closed 5 years ago

Jackodb commented 5 years ago

Dash uses a default interval on the x-axis which makes it quite hard to manually adjust it. I need to find a way to get price values on the x-axis while not displaying them all since that will make it very unclear (tested before).

Jackodb commented 5 years ago

This could be achieved through using tickvals and ticktext. tickvals need to be the values on the x-axis, so: values between 0 and len(orders) ticktext then specifies what the name will be on that spot. So, you would need to figure out a way to find the corresponding ticktext (df.Price) to the specific value on the x-axis: range(len(orders))

See Enumerated Ticks with Tickvals and Ticktext on: https://plot.ly/python/axes/

Jackodb commented 5 years ago

Currently, you have a ticktext on every 5th spot. That's on a dataset of 49 items (so 10 tick texts which is 20% of the total). Since every user has a different number of orders, you would have to use 20% of his total orders as tick texts

Jackodb commented 5 years ago

https://stackoverflow.com/questions/45169189/how-to-call-every-nth-element-in-a-list-of-dates-in-python

Jackodb commented 5 years ago

To hide all values from x-axis while displaying them when hovering: showticklabels=False

https://community.plot.ly/t/not-able-to-hide-axis-labels/16779