Pre loader

VisibleRange is not working on a specific number

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”

However, there is only sample code on the provided github.

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • You must to post comments

Another question. My data is longer than preset visible range. I’d like the chart can zoom in and out on x axis, and can return back to original scale (the visible range before zooming started by mouse wheel) with a double-clicking. For example, the visible x axis range was 0-10 at the very beginning. I dragged the chart to 2-12. And I zoomed in to see details. Finally I double-click to return to the original scale which is 10 seconds long. The final x range should be 2-12, instead of 0-10.

Is there a way to achieve that? I read the documentation and didn’t fully understand how the property zoomExtentsToInitialRange works.

please advise. Many thanks.

  • You must to post comments

Hi Gang,

In order to zoom back to original scale after panning and zooming in for details we need a chart modifier. Right now in SciChart.js we do not have a chart modifier that does exactly what you need. However, it is quite easy to create a custom one.

This is an example how to create a custom MouseWheelZoomModifier which does exactly what you need

import {
} from 'scichart/Charting/ChartModifiers/MouseWheelZoomModifier';
import { ModifierMouseArgs } from 'scichart/Charting/ChartModifiers/ModifierMouseArgs';
import { easing, TEasingFn } from 'scichart/Core/Animations/EasingFunctions';
import { NumberRange } from 'scichart/Core/NumberRange';

export class CustomMouseWheelZoomModifier extends MouseWheelZoomModifier {
    protected isExtendsRangeSet: boolean = false;

    constructor(options?: IMouseWheelZoomModifierOptions) {

    public modifierMouseWheel(args: ModifierMouseArgs): void {
        if (!this.isExtendsRangeSet) {
            this.parentSurface.xAxes.asArray().forEach(xAxis => {
                xAxis.zoomExtentsRange = new NumberRange(xAxis.visibleRange.min, xAxis.visibleRange.max);
                console.log('xAxis.zoomExtentsRange', xAxis.zoomExtentsRange.min, xAxis.zoomExtentsRange.max);
            this.isExtendsRangeSet = true;

    public modifierDoubleClick(args: ModifierMouseArgs) {
        if (this.isExtendsRangeSet) {
            const animationDuration = 500;
            const easingFunction: TEasingFn = easing.outExpo;
            this.parentSurface.zoomExtentsX(animationDuration, easingFunction);
            this.isExtendsRangeSet = false;

You will find the full working Zoom Extends to Original Scale Demo here

Best regards,

  • Gang Xu
    awesome, thanks.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.