@@ -51,25 +51,32 @@ class _MyAppState extends State<MyApp> {
5151 minimum: const EdgeInsets .all (24.0 ),
5252 child: InteractiveChart (
5353 candles: _data,
54- style: ChartStyle (
55- priceGainColor: Colors .teal[200 ]! ,
56- priceLossColor: Colors .blueGrey,
57- volumeColor: Colors .teal.withOpacity (0.8 ),
58- trendLineColor: Colors .blueGrey[200 ]! ,
59- priceGridLineColor: Colors .blue[200 ]! ,
60- priceLabelStyle: TextStyle (color: Colors .blue[200 ]),
61- timeLabelStyle: TextStyle (color: Colors .blue[200 ]),
62- selectionHighlightColor: Colors .red.withOpacity (0.2 ),
63- overlayBackgroundColor: Colors .red[900 ]! .withOpacity (0.6 ),
64- overlayTextStyle: TextStyle (color: Colors .red[100 ]),
65- timeLabelHeight: 32 ,
66- ),
67- overlayInfo: (candle) => {
68- "💎" : "🤚 " ,
69- "高" : "${candle .high ?.toStringAsFixed (2 )}" ,
70- "低" : "${candle .low ?.toStringAsFixed (2 )}" ,
71- },
72- priceLabel: (price) => "${price .round ()} 💎" ,
54+ /** Uncomment the following to see more examples */
55+ /** Example styling */
56+ // style: ChartStyle(
57+ // priceGainColor: Colors.teal[200]!,
58+ // priceLossColor: Colors.blueGrey,
59+ // volumeColor: Colors.teal.withOpacity(0.8),
60+ // trendLineColor: Colors.blueGrey[200]!,
61+ // priceGridLineColor: Colors.blue[200]!,
62+ // priceLabelStyle: TextStyle(color: Colors.blue[200]),
63+ // timeLabelStyle: TextStyle(color: Colors.blue[200]),
64+ // selectionHighlightColor: Colors.red.withOpacity(0.2),
65+ // overlayBackgroundColor: Colors.red[900]!.withOpacity(0.6),
66+ // overlayTextStyle: TextStyle(color: Colors.red[100]),
67+ // timeLabelHeight: 32,
68+ // ),
69+ /** Customize axis labels */
70+ // timeLabel: (timestamp, visibleDataCount) => "📅",
71+ // priceLabel: (price) => "${price.round()} 💎",
72+ /** Customize overlay (tap and hold to see it)
73+ ** Or return a blank object to disable it. */
74+ // overlayInfo: (candle) => {
75+ // "💎": "🤚 ",
76+ // "Hi": "${candle.high?.toStringAsFixed(2)}",
77+ // "Lo": "${candle.low?.toStringAsFixed(2)}",
78+ // },
79+
7380 ),
7481 ),
7582 ),
0 commit comments