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!
- Yevhenii Krasovskyi asked 11 months ago
- last edited 11 months ago
-
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?
-
Added screenshot from TradingView chart. I need to have ranges list like on the screenshot
- You must login to post comments
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
- Andrew Burnett-Thompson answered 11 months ago
- You must login to post comments
I want to add ranges list like on the screenshot from TradingView chart
- Yevhenii Krasovskyi answered 11 months ago
- last edited 11 months ago
- You must login to post comments
I want to add ranges list like on TradingView. Check screenshot please.
- Yevhenii Krasovskyi answered 11 months ago
- last edited 11 months ago
- You must login to post comments
Please login first to submit.