A firm’s growth begins with listening to customer feedback. That’s why we at Syncfusion continuously review the constructive questions and comments we receive from our customers, which subsequently lead to various feature requests. From these requests, we handpicked the most widely asked-for features and made them available in Essential Studio® 2020 Volume 1, our latest release. In this blog post, I’ll quickly review the new chart types for the Flutter Chart widget, along with other new features.
We extended the Syncfusion Flutter Charts widget to support three more financial chart types:
High-low (HiLo) charts illustrate stock price movements by showing high and low values. The following code illustrates how to render a HiLo chart.
[Dart] SfCartesianChart( series: <ChartSeries<_ChartSampleData, DateTime>>[ HiloSeries<_ChartSampleData, DateTime>( dataSource: chartData, xValueMapper: (_ChartSampleData sales, _) => sales.x, lowValueMapper: (_ChartSampleData sales, _) => sales.low, highValueMapper: (_ChartSampleData sales, _) => sales.high ), // Add more series. ] )
Open-high-low-close (OHLC) charts represent the low, high, open, and closing values of a stock over time. The following code illustrates how to render an OHLC chart.
[Dart] SfCartesianChart( series: <ChartSeries<_ChartSampleData, DateTime>>[ HiloOpenCloseSeries<_ChartSampleData, DateTime>( dataSource: chartData, xValueMapper: (_ChartSampleData sales, _) => sales.x, lowValueMapper: (_ChartSampleData sales, _) => sales.low, highValueMapper: (_ChartSampleData sales, _) => sales.high, openValueMapper: (ChartSampleData sales, _) => sales.open, closeValueMapper: (ChartSampleData sales, _) => sales.close ), // Add more series. ] )
Candle charts are similar to OHLC charts in that they too are used to represent the open, high, low, and close price of a stock, but they visualize the data in a different way. The following code illustrates how to render a candle chart.
[Dart] SfCartesianChart( series: <ChartSeries<_ChartSampleData, DateTime>>[ CandleSeries<_ChartSampleData, DateTime>( dataSource: chartData, xValueMapper: (_ChartSampleData sales, _) => sales.x, lowValueMapper: (_ChartSampleData sales, _) => sales.low, highValueMapper: (_ChartSampleData sales, _) => sales.high, openValueMapper: (ChartSampleData sales, _) => sales.open, closeValueMapper: (ChartSampleData sales, _) => sales.close ), // Add more series. ] )
Trendlines are used to show the direction and speed of a value’s rise or fall. The following six types of trendlines can be rendered in Cartesian charts:
Trendlines support appearance customization, animation, tooltips, markers, as well as forward and backward forecasts. The following code illustrates how to render trendlines.
[Dart] SfCartesianChart( series: <ChartSeries<_ChartSampleData, String>>[ ColumnSeries<_ChartSampleData, String>( dataSource: chartData, xValueMapper: (_ChartSampleData data, _) => data.x, yValueMapper: (_ChartSampleData data, _) => data.y, trendlines: <Trendline>[ Trendline( type: TrendlineType.linear ) ] ) ] )
Technical indicators—such as historic price, volume, interest, etc.—are used to forecast financial market direction. The Flutter Chart widget supports the following 10 types of technical indicators:
The following code illustrates how to render technical indicators.
[Dart] SfCartesianChart( indicators: <TechnicalIndicators<_ChartSampleData, dynamic>>[ RsiIndicator<_ChartSampleData, dynamic>( seriesName: 'AAPL' ) ], series: <ChartSeries<_ChartSampleData, dynamic>>[ HiloOpenCloseSeries<_ChartSampleData, dynamic>( dataSource: chartData, name: 'AAPL' ) ] )
I hope you are excited to use these new features in your Flutter applications. For existing customers, the new version is available for download from the license and downloads page, or you can get the packages directly from pub.dev. If you are not yet a customer, you can try our 30-day free trial to check out these new features. Be sure to try our samples from the GitHub location, web sample browser, Play store, or App Store.
Also, if you wish to send us feedback or would like to submit any questions, please feel free to post them in the comments section of this blog post. You can also contact us through our support forum, feedback portal, or Direct-Trac support system.
Here other blog posts related to Flutter updates in Volume 1: