multipe y axis for same dataset
See original GitHub issueI’m trying to get ticks on both the right an left of the chart that use the same data sets. A simple example would be time on the x axis, miles on the left and km on the right. but more specifically I’m working on a experience graph for an rpg like so like so
the left is actually experience earned by the character and the right is level. I’ve achived this with
ticks: {
min: 0,
max: 300000, // set dynamically to equal the left y-axis (max experience)
stepSize: 1,
callback: function (value, index, values) {
const lvlIndex = lvlXP.indexOf(value);
if (lvlIndex !== -1) {
return 'lvl ' + (lvlIndex + 2);
}
}
but considering that the experience could be as high as 500,000 this requires that callback is called up to 500k times and runs incredibly slowly
Is there an efficient was to handle this? I’ve looked at the documentation but havn’t ben able to find anything relevant to this
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Understanding the Dual Y Axis in Charts - Oracle Help Center
In the Chart General Properties, set Toggle Dual Y Split to one of the following: On—creates a secondary Y-Axis in the same chart....
Read more >How to plot single data with two Y-axes (two units) in Matplotlib?
How to plot single data with two Y-axes (two units) in Matplotlib? · Set the figure size and adjust the padding between and...
Read more >Display Data with Multiple Scales and Axes Limits - MathWorks
Learn about techniques for visualizing data with multiple x- and y-axes, multiple colorbars, or with an x-axis that is broken into intervals.
Read more >How to plot two data sets of different scales in same graph in ...
This video explains about How to plot two data sets of different scales in same graph in excel.How to add a second Y...
Read more >How To Add A Second Y Axis To Graphs In Excel - YouTube
In this tutorial, I'm going to show you how to add a second Y axis to a graph by using Microsoft Excel. Adding...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Something like this: https://codepen.io/kurkle/pen/GRgBgWL?editors=0010
Yes, it is possible. I was missing to set yAxes array properly. And for custom axis legend color, we need ticks: { fontColor:… }