Welcome to the Flutter feedback portal. We’re happy you’re here! If you have feedback on how to improve the Flutter, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Video:
https://drive.google.com/file/d/1Qgey3glGp8IlzWXseQxQ73_tjoGknBOu/viewdouble zoomFactor =
candles.isNotEmpty
? (20 / candles.length).clamp(0.0, 1.0)
: 1.0;
return SfCartesianChart(
primaryXAxis: DateTimeAxis(
name: 'date_axis',
dateFormat: DateFormat.Md().add_Hm(),
majorGridLines: const MajorGridLines(width: 0),
zoomFactor: zoomFactor,
zoomPosition: 1 - zoomFactor,
axisLine: AxisLine(
width: 1,
color: Get.theme.dividerColor.withOpacity(0.5),
),
primaryYAxis: NumericAxis(
name: 'currency_axis',
numberFormat: compactUsdCurrencyFormatter,
opposedPosition: true,
rangePadding: ChartRangePadding.round,
labelPosition: ChartDataLabelPosition.inside,
axisLine: const AxisLine(width: 0),
majorTickLines: const MajorTickLines(width: 0),
majorGridLines: MajorGridLines(
color: Get.theme.dividerColor.withOpacity(0.5),
width: 1,
),
),
series: [
CandleSeries(
name: 'Candles',
dataSource: candles,
xValueMapper: (candle, index) => candle.date,
lowValueMapper: (candle, index) => candle.low,
highValueMapper: (candle, index) => candle.high,
openValueMapper: (candle, index) => candle.open,
closeValueMapper: (candle, index) => candle.close,
bullColor: ColorUtils.bullColor,
bearColor: ColorUtils.bearColor,
enableSolidCandles: true,
borderWidth: 1,
xAxisName: 'date_axis',
yAxisName: 'currency_axis',
),
],
zoomPanBehavior: ZoomPanBehavior(enablePinching: true,enablePanning: true,zoomMode: ZoomMode.x,maximumZoomLevel: zoomFactor / 5,),
);