Hello All,
I was trying to set the visual range property on a numeric axis but i get the error that the “equals” is not a function of NumerixAxis. This happens when i try the following.
export function setXAxisVisibleRange(element, visibleRange) {
const { sciChartSurface } = resolveContext(element);
var axis = sciChartSurface.xAxes.get(0);
axis.visibleRange = visibleRange; **//error here**
}
attached is a picture of a more detailed error. Ultimately what I am trying to do is to sync up the visual range of two charts x axis like in the following tutorial
Thanks for your help in advance.
UPDATE
So my issue was that I had a serialization issue with the NumberRange class. I can now sync up the charts just like in the tutorial. The problem now is that if I scroll or zoom very fast eventually the charts start to flicker in an endless loop. Has anyone ever seen this behavior? One thing I notice is that the min and max value have over 10 decimal points.
Here is a quick printout of the value change events between the two charts when the flickering starts.
Any ideas?
–> CH.1 Min: 0.532180460735786 Max: 3.457511660735786
–> CH.2 Min: -0.17488026755852848 Max: 4.339519732441472
–> CH.2 Min: 0.025927491638795958 Max: 4.088887491638796
–> CH.2 Min: 0.38738145819397996 Max: 3.63774945819398
–> CH.1 Min: 0.5319630448160535 Max: 3.4572942448160537
–> CH.2 Min: 0.532180460735786 Max: 3.457511660735786
–> CH.1 Min: -0.17488026755852848 Max: 4.339519732441472
–> CH.1 Min: 0.025927491638795958 Max: 4.088887491638796
–> CH.1 Min: 0.38738145819397996 Max: 3.63774945819398
–> CH.2 Min: 0.5319630448160535 Max: 3.4572942448160537
–> CH.1 Min: 0.532180460735786 Max: 3.457511660735786
–> CH.2 Min: -0.17488026755852848 Max: 4.339519732441472
–> CH.2 Min: 0.025927491638795958 Max: 4.088887491638796
–> CH.2 Min: 0.38738145819397996 Max: 3.63774945819398
–> CH.1 Min: 0.5319630448160535 Max: 3.4572942448160537
–> CH.2 Min: 0.532180460735786 Max: 3.457511660735786
–> CH.1 Min: -0.17488026755852848 Max: 4.339519732441472
–> CH.1 Min: 0.025927491638795958 Max: 4.088887491638796
–> CH.1 Min: 0.38738145819397996 Max: 3.63774945819398
–> CH.2 Min: 0.5319630448160535 Max: 3.4572942448160537
–> CH.1 Min: 0.532180460735786 Max: 3.457511660735786
–> CH.2 Min: -0.17488026755852848 Max: 4.339519732441472
–> CH.2 Min: 0.025927491638795958 Max: 4.088887491638796
–> CH.2 Min: 0.38738145819397996 Max: 3.63774945819398
–> CH.1 Min: 0.5319630448160535 Max: 3.4572942448160537
–> CH.2 Min: 0.532180460735786 Max: 3.457511660735786
–> CH.1 Min: -0.17488026755852848 Max: 4.339519732441472
–> CH.1 Min: 0.025927491638795958 Max: 4.088887491638796
–> CH.1 Min: 0.38738145819397996 Max: 3.63774945819398
–> CH.2 Min: 0.5319630448160535 Max: 3.4572942448160537
–> CH.1 Min: 0.532180460735786 Max: 3.457511660735786
–> CH.2 Min: -0.17488026755852848 Max: 4.339519732441472
- Sergio Faura asked 2 years ago
- last edited 2 years ago
-
Things to check: (1) are you using the same instance of NumberRange on many charts? Don’t do that. Create a new one each time. Does our Sync Multi Chart tutorial unmodified cause this instability?
- You must login to post comments
Hello Andrew. I got to the bottom of the issue and it was on my end of. I am using blazor and I had a sync issue when going back and forth between .net and JS worlds. Everything is working as expected now.
Thanks for your help!
Sergio.
- Sergio Faura answered 2 years ago
- You must login to post comments
Good morning Sergio
For issue #1 visibleRange must be a NumberRange instance, which you correctly found out. It would be great if you could apply visibleRange just as a javascript object e.g. { min: 10, max: 20 }. It’s not a change we can easily apply as it would be modifying the API.
For issue #2 I’ve personally never seen instability when linking multiple charts together. Does our tutorial here unmodified reproduce this?
- Andrew Burnett-Thompson answered 2 years ago
- You must login to post comments
Please login first to submit.