File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ class _MyAppState extends State<MyApp> {
6969 "高" : "${candle .high ?.toStringAsFixed (2 )}" ,
7070 "低" : "${candle .low ?.toStringAsFixed (2 )}" ,
7171 },
72- timeLabel: (timestamp, count) => "<Date>" ,
7372 priceLabel: (price) => "${price .round ()} 💎" ,
7473 ),
7574 ),
Original file line number Diff line number Diff line change @@ -1114,7 +1114,7 @@ class MockDataTesla {
11141114
11151115 static List <CandleData > get candles => _rawData
11161116 .map ((row) => CandleData (
1117- timestamp: row[0 ],
1117+ timestamp: row[0 ] * 1000 ,
11181118 open: row[1 ]? .toDouble (),
11191119 high: row[2 ]? .toDouble (),
11201120 low: row[3 ]? .toDouble (),
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ class _InteractiveChartState extends State<InteractiveChart> {
247247 }
248248
249249 String defaultTimeLabel (int timestamp, int visibleDataCount) {
250- final date = DateTime .fromMillisecondsSinceEpoch (timestamp * 1000 )
250+ final date = DateTime .fromMillisecondsSinceEpoch (timestamp)
251251 .toIso8601String ()
252252 .split ("T" )
253253 .first
@@ -266,7 +266,7 @@ class _InteractiveChartState extends State<InteractiveChart> {
266266
267267 Map <String , String > defaultOverlayInfo (CandleData candle) {
268268 final date = intl.DateFormat .yMMMd ()
269- .format (DateTime .fromMillisecondsSinceEpoch (candle.timestamp * 1000 ));
269+ .format (DateTime .fromMillisecondsSinceEpoch (candle.timestamp));
270270 return {
271271 "Date" : date,
272272 "Open" : candle.open? .toStringAsFixed (2 ) ?? "-" ,
You can’t perform that action at this time.
0 commit comments