diff --git a/doc/src/examples-customchart.qdoc b/doc/src/examples-customchart.qdoc new file mode 100644 index 0000000..c56993f --- /dev/null +++ b/doc/src/examples-customchart.qdoc @@ -0,0 +1,7 @@ +/*! + \example examples/customchart + \title Custom chart example + \subtitle + + This example shows how to customize the appearance of the whole chart. +*/ diff --git a/doc/src/examples-customcolors.qdoc b/doc/src/examples-customcolors.qdoc deleted file mode 100644 index f6b0411..0000000 --- a/doc/src/examples-customcolors.qdoc +++ /dev/null @@ -1,22 +0,0 @@ -/*! - \example examples/customcolors - \title CustomColors Example - \subtitle - - The example shows how to customize different visual elements on a typical chart. The following - chart uses a predefined theme: - \snippet ../examples/customcolors/mainwindow.cpp 4 - \image custom_colors1.jpg - - Let's customize it to look like this instead: - \image custom_colors2.jpg - - Customize chart background with the company specific colors: - \snippet ../examples/customcolors/mainwindow.cpp 1 - - Customize chart axes: - \snippet ../examples/customcolors/mainwindow.cpp 2 - - Customize pen and brush of all the series we have: - \snippet ../examples/customcolors/mainwindow.cpp 3 -*/ \ No newline at end of file diff --git a/doc/src/examples-ekgchart.qdoc b/doc/src/examples-ekgchart.qdoc new file mode 100644 index 0000000..e3fc966 --- /dev/null +++ b/doc/src/examples-ekgchart.qdoc @@ -0,0 +1,7 @@ +/*! + \example examples/ekgchart + \title EKG chart Example + \subtitle + + The example shows how to simulate a EKG chart. +*/ diff --git a/doc/src/examples-modeldata.qdoc b/doc/src/examples-modeldata.qdoc new file mode 100644 index 0000000..fef4f1b --- /dev/null +++ b/doc/src/examples-modeldata.qdoc @@ -0,0 +1,7 @@ +/*! + \example examples/modeldata + \title Model data example + \subtitle + + This example shows how to use QAbstractItemModel derived model as the data for the series. +*/ diff --git a/doc/src/examples-scatterinteractions.qdoc b/doc/src/examples-scatterinteractions.qdoc new file mode 100644 index 0000000..1075f77 --- /dev/null +++ b/doc/src/examples-scatterinteractions.qdoc @@ -0,0 +1,7 @@ +/*! + \example examples/scatterinteractions + \title ScatterChart Example + \subtitle + + The example shows how to create simple scatter chart and how to interact with the chart. +*/ diff --git a/doc/src/example-splinechart.qdoc b/doc/src/examples-splinechart.qdoc similarity index 100% rename from doc/src/example-splinechart.qdoc rename to doc/src/examples-splinechart.qdoc diff --git a/doc/src/examples-stackedbarchart-drilldown.qdoc b/doc/src/examples-stackedbarchart-drilldown.qdoc deleted file mode 100644 index e5402b7..0000000 --- a/doc/src/examples-stackedbarchart-drilldown.qdoc +++ /dev/null @@ -1,42 +0,0 @@ -/*! - \example examples/stackedbarchartdrilldown - \title StackedBarChart Drilldown Example - \subtitle - - The example shows how to implement drilldown using stacked barchart. In drilldown example we create stacked barchart, which shows the harvest of various chili peppers during season. In season view the harvest is grouped by month. To drill down to weekly view, user clicks selected month with right mouse button. On weekly view, the harvest of clicked month is shown by week. For example purposes each month is 4 weeks long :) - - Season view looks like this: - \image stackedbarchart_drilldown_season.png - - Right mouse button clicked on august, shows the harvest from august: - \image stackedbarchart_drilldown_august.png - - Here we define a drilldown series, which adds mapping for categories to other drilldown series. - Purpose of drilldown series is to contain knowledge of the drilldown structure. The mapDrilldownSeries function maps the category to given series. We can ask the mapping for category with drilldownSeries(QString category) function. - - \snippet ../examples/stackedbarchartdrilldown/main.cpp 1 - - To enable drilldown we create own view, which implements handler for right click. All QBarSeries derived classes send out rightClicked(QBarSet*, QString) signal when series is clicked with right mouse button. The parameters QBarSet and QString contain the pointer to clicked bar set and name of category, where click occured. - - In our DrilldownChart we implement handler, which selects the drilldown chart with the category. - - \snippet ../examples/stackedbarchartdrilldown/main.cpp 2 - - Here we define data, which we use to construct the chart. - - \snippet ../examples/stackedbarchartdrilldown/main.cpp 3 - - To create the drilldown structure, we first create our top level series, which we call seasonSeries. For each month in seasonSeries we create a drilldown series, called weeklySeries which contains more detailed data for that month. - In weeklySeries, we use the drilldown handler to bring us back to seasonSeries. To do this we add mapping to the series. The seasonSeries is mapped to weeklySeries for each month. Every weeklySeries is mapped back to the seasonSeries. - To make mapping work, we connect the rightClicked signals from our series to the drilldownChart. - - \snippet ../examples/stackedbarchartdrilldown/main.cpp 4 - - When we have our drilldown structure ready, we can add the data to it. Here we generate random crop for each plant in each week. The monthly crop is calculated from weekly crops. To enable floating values, we connect the clicked signal to toggle the value of corresponding set. - - \snippet ../examples/stackedbarchartdrilldown/main.cpp 5 - - Here we set the chart to show top level series initially. - - \snippet ../examples/stackedbarchartdrilldown/main.cpp 6 -*/ \ No newline at end of file diff --git a/doc/src/examples-stackedbarchartdrilldown.qdoc b/doc/src/examples-stackedbarchartdrilldown.qdoc new file mode 100644 index 0000000..51881b2 --- /dev/null +++ b/doc/src/examples-stackedbarchartdrilldown.qdoc @@ -0,0 +1,7 @@ +/*! + \example examples/stackedbarchartdrilldown + \title Stacked bar chart drilldown example + \subtitle + + The example shows how to create stacked bar chart with a drilldown effect. +*/ diff --git a/doc/src/examples-zoomlinechart.qdoc b/doc/src/examples-zoomlinechart.qdoc new file mode 100644 index 0000000..70d4579 --- /dev/null +++ b/doc/src/examples-zoomlinechart.qdoc @@ -0,0 +1,7 @@ +/*! + \example examples/zoomlinechart + \title Zoom line example + \subtitle + + The example shows how to create your own custom zooming effect with QRubberBand. +*/ diff --git a/doc/src/examples.qdoc b/doc/src/examples.qdoc index c2476d1..a4e2cff 100644 --- a/doc/src/examples.qdoc +++ b/doc/src/examples.qdoc @@ -15,16 +15,20 @@