diff options
author | Charles Yin <charles.yin@nokia.com> | 2011-05-18 13:46:16 +1000 |
---|---|---|
committer | Charles Yin <charles.yin@nokia.com> | 2011-05-18 13:46:16 +1000 |
commit | 2e68186a80bff4940fa58b30b6e25c005489f194 (patch) | |
tree | 20f68742e89364fc97bad4dda5ac5a3b8dbe008b /examples | |
parent | 8df66dbeb54bbdb26d18fdf7b884a694e9c366bd (diff) |
show initial chart in motion chart example
Change-Id: I39297ced1c532f633a7c9c6c64c0818bbc852084
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/canvas/motionchart/motionchart.qml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/declarative/canvas/motionchart/motionchart.qml b/examples/declarative/canvas/motionchart/motionchart.qml index c408e99bd8..974690e3fc 100644 --- a/examples/declarative/canvas/motionchart/motionchart.qml +++ b/examples/declarative/canvas/motionchart/motionchart.qml @@ -4,7 +4,7 @@ Canvas { id:motionChart width:1300 height: 700 - property int progress:0 + property int progress:-1 property variant applesFrom: [1000, 300]; property variant applesTo:[1200, 400]; property variant orangesFrom: [1150, 200]; @@ -24,8 +24,12 @@ Canvas { Text {id:expenses; text: "Expenses 1300"; x:1170; y:670;font.bold:true; font.pixelSize:15; opacity:0} Timer { id:timer - interval: 1; running: false; repeat: true + interval: 1; running: true; repeat: true onTriggered: { + if (motionChart.progress == -1) { + motionChart.setup(); + running = false; + } motionChart.draw(); } } @@ -46,6 +50,7 @@ Canvas { } } + function setup() { var ctx = motionChart.getContext("2d"); ctx.globalCompositeOperation = "source-over"; |