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 axis formatting / scale?

See original GitHub issue

Hi,

I’m trying to build a stacked area chart, that reacts on a signal for toggling between absolute and normalized values. The absolute values are in a currency domain and the normalized ones are percentages.

Is there any way to set an axis’ format and scale properties from a signal?

https://gist.github.com/jazzido/5660ba691c465010b138

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jheercommented, Apr 20, 2018

Hi everyone, this issue is a holdout from Vega 2, and has been partially addressed in Vega 3.

  • You should now be able to use a signal to dynamically set the format property.
  • You can not dynamically set the scale property. Information about the specific scale (in particular, its type) is used within the Vega parser to determine the appropriate output. However, there is flexibility around which data fields are used to parameterize a scale – so you can get dynamic axes by changing the underlying scale instead. For an example, see https://vega.github.io/vega/examples/scatter-plot-null-values/

As we do not currently intend to make changes here, I’m closing out the issue.

1reaction
kenklincommented, Apr 30, 2018

@jazzido Also remember to relocate the scale references in marks from enter to update if you want them to be dynamic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Dynamically Change Axis Measures and Formats in ...
Learn how to create a parameter changes axis measures and formatting by swapping different sheets with different metrics.
Read more >
Dynamic axis scale - Tableau Community
Is there a way to dynamically change the scale(logarithmic, reversed, ... Dynamic Axis Labels/Formatting/Tooltips for Measure Selector.
Read more >
Dynamic Axis Labels - Tip Week - The Data School
Dynamic Axis Labels - Tip Week ... this tip is how to change your axis label to show the measure name, rather than...
Read more >
Bokeh Dynamic Axis Scaling - Stack Overflow
Everything else is just formatting the data, setting the lines to visible or not and the callback function. Is there a way to...
Read more >
Dynamic Chart Y-Axis Formatting | MrExcel Message Board
Dynamic Chart Y-Axis Formatting ... I just made a simple test chart and went format, scale, and selected currency, £ this worked fine...
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