question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dynamic toggling of temporal x-axis values

See original GitHub issue

Hi I need to make switch button to hide/show x-axis but without hiding the vertical lines of the grid so I trying something like:

axes: [{
    values: () => []
}]

but I don’t know how can I add the values again Also, how can I turn on the minor ticks? Thanks 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
leeoniyacommented, Mar 20, 2020

those config arrays are compiled into a static formatting function when they’re defined.

you can do it with a bit of a hack, though: create a dummy uPlot instance and then pull the compiled formatter from it. then use that formatter in your real uPlot:

https://jsfiddle.net/dse1qpat/

another option would be to simply draw a white box over the top of the axis values in the drawAxes hook.

1reaction
leeoniyacommented, Mar 20, 2020

similar to #159:

https://jsfiddle.net/nxrpt8jd/2/

here i’m using .redraw() instead of .setData() because the series paths do not need to be recomputed, and it is cheaper.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Highcharts update x-axis categories dynamically
js to the chart to update it as new data comes in. Specifically, I am trying to update the xAxis categories and the...
Read more >
How to change x-Axis value to dynamic value in bar...
How to change x-Axis value to dynamic value in bar chart based on slicer filter value selected. ... If I filter the data...
Read more >
Time Cartesian Axis
Time Cartesian Axis. The time scale is used to display times and dates. Data are spread according to the amount of time between...
Read more >
Time Series Data Visualization with Python
How to explore the temporal structure of time series with line plots, ... In this plot, time is shown on the x-axis with...
Read more >
Temporal analysis of enhancers during mouse cerebellar ...
The majority of cerebellar enhancers have dynamic activity between ... P-value ≤0.05) throughout cerebellar development (Figure 2A, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found