Home Forums StockChart Support stock chart with react

stock chart with react

Viewing 2 posts - 1 through 2 (of 2 total)
  • #31382

    Hello,

    Thanks for the slider update on stock chart!
    https://canvasjs.com/docs/stockcharts/methods/slider/set/

    I m following react stock chart example.
    https://canvasjs.com/docs/stockcharts/integration/react/

    With new library in place in m calling the set() method like this
    stockChartRef.current.options.navigator.slider.set('minimum', new Date(moment.unixSecondsToDate(chartSliderRange.maximum)));

    Getting error Uncaught TypeError: stockChartRef.current.options.navigator.slider.set is not a function

    On logging stockChartRef.current.options.navigator.slider on the console, I can see the set() methos on the prototype property.
    May I know how to access set() method with react stock chart?

    Regards

    #31399

    Shashank,

    Slider methods are accessible within the actual slider element and not the options of slider that you pass to StockChart. As mentioned in documentation stockChart.navigator.slider.set('minimum', new Date(2018, 01, 01)); should work fine in your case.

    If you are still facing issue, kindly share sample project reproducing the issue you are facing & share it with us over Google-Drive or Onedrive along with sample / dummy data so that we can run it locally to debug at our end to understand the use-case better and help you resolve.


    Vishwas R
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.