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.

Reset Subchart Zoom

See original GitHub issue

Using a line chart with a subchart, what is the best way to reset the zoom of the chart after making a selection within the subchart via an external button?

I have tried with the likes of .unzoom() and .flush() with no result.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
watnabcommented, Sep 16, 2020

.flush

Force to redraw.

.unzoom

Unzoom zoomed area

.tooltip․hide

Hide tooltip


https://naver.github.io/billboard.js/release/latest/doc/Chart_api_zoom.ts.html#line178

	unzoom(): void {
		if ($$.scale.zoom) {
			config.subchart_show ?
				$$.brush.getSelection().call($$.brush.move, null) :

$$.scale.zoom may be falsy when the chart type is subchart even if the chart is zoomed.

0reactions
netilcommented, Sep 24, 2020

I never insist they must work together.

It doesn’t mean that you are. Is just, need to be make sure the reliability of the features. I’ll be considering how to organize both, but for now .flush() will reset zoom state for zoom & subchart.

BTW, thanks for the demo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how can I get all the subplots to zoom and pan the same ...
1 Answer 1. Sorted by: Reset to default. Highest score (default) ...
Read more >
subchart: Initial zoom and pan
Hi,. I have a timeseries chart navigable with a subchart, and I want it to start showing only the last week (and in...
Read more >
ZoomOptions class - billboard library - Dart API
If true set, y domain will be updated according to the zoomed region. read / write. resetButton ↔ dynamic: Set to display zoom...
Read more >
Chart Parameters
Displays the Show Trades checkboxes along the top of the chart. Volume Plots trade volume in a sub-chart. Set the Volume Plot Height...
Read more >
config/Options/interaction/zoom.ts - billboard.js API doc
resetButton.text='Reset Zoom'] Text value for zoom reset button. * @see [Demo:zoom](https://naver.github.io/billboard.js/demo/#Interaction.
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