How to use the @antv/gui.Slider function in @antv/gui

To help you get started, we’ve selected a few @antv/gui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github antvis / G2Plot / src / interaction / slider.ts View on Github external
private renderSlider(): void {
    if (!this.slider) {
      this.container = this.canvas.addGroup();
      this.slider = new Slider(this.getSliderConfig());
      this.slider.on('sliderchange', this.onChangeFn);
      this.container.add(this.slider);
    } else {
      this.slider.update(this.getSliderConfig());
    }
  }
github antvis / G2Plot / src / layers / SliderLayer.ts View on Github external
public render(): void {
    if (!this.container) {
      this.container = this.getCanvasController().canvas.addGroup();
    }
    if (this.slider) {
      this.slider.off('sliderchange', this.onChange);
      this.slider.remove(true);
    }
    this.slider = new Slider(this.getSliderConfig());
    this.slider.on('sliderchange', this.onChange);
    this.container.add(this.slider);

    this.getCanvasController().canvas.draw();
  }

@antv/gui

UI components for AntV G.

MIT
Latest version published 1 year ago

Package Health Score

39 / 100
Full package analysis

Popular @antv/gui functions