Here are some questions I have about CandleSeries chart:
1.At the first time I open the graph, I want to see the last time line.
2.How can I zoom by default (Display smaller candles).
3.How can I set the period in the graph?
4.How to display live chart.
// showIndicationForSameValues: true,
// animationDuration: 1000,
xValueMapper: (GetSymbolChartRespItemDto data, _) => data.timestamp,
lowValueMapper: (GetSymbolChartRespItemDto data, _) => data.low,
highValueMapper: (GetSymbolChartRespItemDto data, _) => data.high,
openValueMapper: (GetSymbolChartRespItemDto data, _) => data.open,
closeValueMapper: (GetSymbolChartRespItemDto data, _) => data.close)
majorGridLines: MajorGridLines(width: 0)
We are validating your query at our end and we will update further details in one business day on 17 January 2023. We appreciate your patience until then.
Please find the response to your query below,
Query 1#: At the first time I open the graph, I want to see the last timeline.
Your requirement can be achieved with help of the autoScrollingDelta and autoScrollingMode properties in the chart axis. The autoScrollingDelta option specifies the number of data points to display in the visible range, and the autoScrollingMode option determines whether shown data points are displayed at the start or end of the chart. We have shared the code snippet below for your reference.
majorGridLines: const MajorGridLines(width: 0),
Query 2#: How can I zoom by default (Display smaller candles).
In your code snippet, you set value for the properties zoomFactor and zoomPosition in the x-axis. The zoomFactor indicates how much of the axis should be visible in the range, while the zoomPosition indicates where the axis should begin to be shown. When there is a small amount of data, the width of the candle series will be larger because the width of the candle series is determined by the visible range of the axis and the number of data points present in that range. To avoid this, you can remove the zoomFactor and zoomPosition properties in the axis to render the initial chart with a smaller width.
Query 3#: How can I set the period in the graph?
We suspect that you are asking about the indicator, currently, we have 10 different indicator support in our chart. We have shared the below UG and KB documentation for your reference. It will explain how to use the indicator in the chart.
Query 4#: How to display live chart.