I want to populate a CandlestickSeries with data from a custom class.
I thought I would use a Repeater as usual, but it doesn't seem to work:
ChartView {
title: "Candlestick Series"
width: 400
height: 300
CandlestickSeries {
name: "Acme Ltd."
increasingColor: "green"
decreasingColor: "red"
/*
CandlestickSet { timestamp: 1435708800000; open: 690; high: 694; low: 599; close: 660 }
CandlestickSet { timestamp: 1435795200000; open: 669; high: 669; low: 669; close: 669 }
CandlestickSet { timestamp: 1436140800000; open: 485; high: 623; low: 485; close: 600 }
CandlestickSet { timestamp: 1436227200000; open: 589; high: 615; low: 377; close: 569 }
CandlestickSet { timestamp: 1436313600000; open: 464; high: 464; low: 254; close: 254 }
*/
Repeater {
model: 100
delegate: CandlestickSet {
timestamp: 1000 * 60 * index + 1436313600000
open: 400; high: 500; low: 300; close: 380
}
}
}
}
The commented out part (taken straight from the documentation) works fine.
The Repeater-based code produces no data points.
How to dynamically fill a CandlestickSeries?
Note: I also tried an alternative approach using JS, and that failed too.