Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QtObject {
- id: __private
- /**
- * @brief initialised cell, if cell has chartView and configurationProxy
- */
- function initIfCan() {
- if (!itemRoot.chartView || !itemRoot.configurationProxy || !_yAxis) return
- var oldSeries = chartView.series(itemRoot.seriesName)
- if (oldSeries) chartView.removeSeries(oldSeries)
- var series = chartView.createSeries(ChartView.SeriesTypeLine,
- seriesName,
- chartView.xAxis,
- yAxis)
- for (var i = 0; i < 1000; ++i)
- {
- series.append(i/5, Math.sin(i/5)/2 + 0.5)
- }
- itemRoot.configurationProxy.registerSeriesAtIndex(series, channelIndex)
- lineSeries = series
- }
- property LineSeries lineSeries
- property ValueAxis _yAxis: ValueAxis {
- id: yAxis
- min: itemRoot.fromYValue
- max: itemRoot.toYValue
- gridVisible: false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement