##// END OF EJS Templates
fixed typo in doc
sauimone -
r1448:3be0886b7d70
parent child
Show More
@@ -1,29 +1,29
1 /*!
1 /*!
2 \example examples/legend
2 \example examples/legend
3 \title Legend Example
3 \title Legend Example
4 \subtitle
4 \subtitle
5
5
6 This example shows how to detach legend from chart and how to attach it back. By default the chart
6 This example shows how to detach legend from chart and how to attach it back. By default the chart
7 draws the legend inside same view with the chart. In some cases user may want to draw legend to somewhere else. To make this possible the legend can be detached from the chart. Detaching means that chart doesn't draw the legend or try to change it's layout. Detached can then be drawn where user wants, for example in different graphics scene. The behaviour of legend can be inspected by running the legend example.
7 draws the legend inside same view with the chart. In some cases user may want to draw legend to somewhere else. To make this possible the legend can be detached from the chart. Detaching means that chart doesn't draw the legend or try to change it's layout. Detached legend can then be drawn where user wants, for example in different graphics scene. The behaviour of legend can be inspected by running the legend example.
8 In example we use barseries where we add or remove barsets. The legend reflects the changes in series. Legend can be detached or attached back to chart and its alignment can be modified.
8 In example we use barseries where we add or remove barsets. The legend reflects the changes in series. Legend can be detached or attached back to chart and its alignment can be modified.
9 When legend is detached, it can be resized and positioned freely.
9 When legend is detached, it can be resized and positioned freely.
10
10
11 \image examples_legend_detach.png
11 \image examples_legend_detach.png
12
12
13 Here we turn legend visible and set its alignment to the bottom of the chart.
13 Here we turn legend visible and set its alignment to the bottom of the chart.
14
14
15 \snippet ../examples/legend/mainwidget.cpp 1
15 \snippet ../examples/legend/mainwidget.cpp 1
16
16
17 This snippet shows how to detach the legend from chart. After detaching, we turn its background to visible and set a different color to it. This makes it easier to see, how the items inside legend are arranged
17 This snippet shows how to detach the legend from chart. After detaching, we turn its background to visible and set a different color to it. This makes it easier to see, how the items inside legend are arranged
18 in detached mode.
18 in detached mode.
19
19
20 \snippet ../examples/legend/mainwidget.cpp 2
20 \snippet ../examples/legend/mainwidget.cpp 2
21
21
22 Here we attach legend back to chart. The background is turned invisible.
22 Here we attach legend back to chart. The background is turned invisible.
23
23
24 \snippet ../examples/legend/mainwidget.cpp 3
24 \snippet ../examples/legend/mainwidget.cpp 3
25
25
26 This shows how we set the detached legend dimensions. After setting new values, we call update to show changes on screen.
26 This shows how we set the detached legend dimensions. After setting new values, we call update to show changes on screen.
27
27
28 \snippet ../examples/legend/mainwidget.cpp 4
28 \snippet ../examples/legend/mainwidget.cpp 4
29 */
29 */
General Comments 0
You need to be logged in to leave comments. Login now