Pre loader

Set xAxis range for D, 3D, W, M, YTD, MAX

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

Answered
1
0

I need to set range for stock chart from some records(first today’s record, first record of day before yesterday, etc for week, month, start of current year and the first record of chart) to last record.

To set the range i need to get indexes of this rows. Tell me please how can i do this for stock xValues. May be i can mark some records to find if faster or i need to check every records from 0 to MAX and then select the range?

Thank you!

Version
3.1.346
Images
  • Andrew Burnett-Thompson
    Hi Yevhenii, your question isn’t clear. Do you have a screenshot or a sketch to show what you want to achieve? Is there a similar application you’re trying to emulate?
  • Yevhenii Krasovskyi
    Added screenshot from TradingView chart. I need to have ranges list like on the screenshot
  • You must to post comments
Best Answer
0
0

Got it. Thanks!

At the moment SciChart.js isn’t built like this – you’d have to have UI outside the SciChartSurface to select a timeframe, then load the correct data into the chart.

For example: our Candlestick Chart Example uses Binance.us API to load an hourly chart into SciChart.js.

If you wanted to change this to daily chart, you’d need to have some UI to select timeframe, request new price bars from exchange, then replace the data in the chart.

It’s really easy to swap the data on a chart, just call dataSeries.clear() and dataSeries.appendRange() with new values. SciChart.js will then redraw with the new updated data.

What else was it you needed? Something about indexes? Explain why and I’ll do my best to help.

Best regards
Andrew

  • You must to post comments
0
0

I want to add ranges list like on the screenshot from TradingView chart

Images
  • You must to post comments
0
0

I want to add ranges list like on TradingView. Check screenshot please.

Images
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.