Closed hongmono closed 2 years ago
I don't want to use Volume
Set volumeHeightFactor: 0
to hide the volume portion.
InteractiveChart(..., style: ChartStyle(volumeHeightFactor: 0,...))
If set it to volumeHeightFactor: 0
, the volume chart is not visible. But still...
List<CandleData> data = MockDataTesla.rawData
.map((row) => CandleData(
timestamp: row[0] * 1000,
open: row[1]?.toDouble(),
high: row[2]?.toDouble(),
low: row[3]?.toDouble(),
close: row[4]?.toDouble(),
volume: 0,
))
.toList();
An error occurs when volume input is zeroed.
I see, this happens when all values are equal.
A workaround (until it's fixed in a future version) is to randomly assign values to them: volume: Random().nextDouble(), ...
.
Thanks it's works!
If I input the volume as 1, I get an error.