Has anybody a solution to this?

Tried two different approaches:

https://stackoverflow.com/questions/66279947/qml-qtcharts-candlestickseries-repeater
https://stackoverflow.com/questions/66280361/qml-qtcharts-candlestickseries-append-returns-false

Both failed.




On Sat, Jan 30, 2021 at 1:27 AM Federico Ferri <[email protected]>
wrote:

> I need to populate a CandlestickSeries inside a ChartView:
>
>         ChartView {
>             id: chartView
>             width: 600
>             height: 400
>             CandlestickSeries {
>                 id: series
>                 name: "test"
>             }
>         }
>
> tried the following code, but nothing is added to the chart:
>
>         for(var i = 0; i < data.length; i++) {
>             var x = data[i]
>             var css = Qt.createQmlObject('import QtCharts 2.15;
> CandlestickSet {}', dataProvider, "dynamicSnippet1")
>             css.timestamp = x.timestamp * 1000
>             css.open = x.open
>             css.high = x.high
>             css.low = x.low
>             css.close = x.close
>             series.append(css)
>             console.log(x.timestamp, x.open, x.high, x.low, x.close)
>         }
>
> it seems the append() method of CandlestickSeries doesn't take raw values
> just like XYSeries
>
_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest

Reply via email to