diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
index b992ba2..b008d1d 100644
--- a/doc/src/classes.qdoc
+++ b/doc/src/classes.qdoc
@@ -3,89 +3,99 @@
\title QtCommercial Charts API
\keyword All Classes
- Charts API is build on top of Qt Graphics View Framework. Charts can be displayed as QGraphicsWidget using QChart class. However
+ Charts API is build on top of Qt Graphics View Framework. Charts can be displayed as QGraphicsWidget using QChart class. However
there is also convenience class QChartView which is QWidget based. These lets quickly use QCharts as normal Qt widget.
The API supports following chart types:
-
+
\list
\o area
- \o line
- \o bar
- \o percent bar
+ \o line
+ \o grouped bar
+ \o percent bar
\o pie
\o scatter
\o spline
\o stacked bar
\endlist
-
-
+
+
Each chart type is represented by QSeries derived class. To create given chart type users have to use instace of releted sereis class and add it to QChart/QChartView instance.
\code
QLineSeries* series = new QLineSeries();
series->add(0, 6);
series->add(2, 4);
...
- chart->addSeries(series);
+ chartView->chart()->addSeries(series);
\endcode
-
+
\raw HTML
-
-
-
-
+
+
+
-
-
- |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
diff --git a/tests/tablemodelchart/customtablemodel.cpp b/tests/tablemodelchart/customtablemodel.cpp
index 80e682b..2ae986e 100644
--- a/tests/tablemodelchart/customtablemodel.cpp
+++ b/tests/tablemodelchart/customtablemodel.cpp
@@ -30,7 +30,7 @@ CustomTableModel::CustomTableModel(QObject *parent) :
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
m_columnCount = 7;
- m_rowCount = 29;
+ m_rowCount = 10;
m_labels.append("Apples");
m_labels.append("Oranges");
diff --git a/tests/tablemodelchart/tablewidget.cpp b/tests/tablemodelchart/tablewidget.cpp
index b7b10e7..fa4d9d7 100644
--- a/tests/tablemodelchart/tablewidget.cpp
+++ b/tests/tablemodelchart/tablewidget.cpp
@@ -251,6 +251,14 @@ void TableWidget::updateChartType(bool toggle)
// m_mapper->setFirst(3);
// m_mapper->setCount(4);
+ QAxisCategories* xCategories = m_chart->axisX()->categories();
+ xCategories->insert(50, "Jeden");
+ xCategories->insert(100, "Dwa");
+ xCategories->insert(150, "Trzy");
+ xCategories->insert(200, "Cztery");
+ xCategories->insert(250, "Piec");
+ xCategories->insert(300, "szesc");
+
m_mapper = new QVXYModelMapper;
m_mapper->setModel(m_model);
m_mapper->setSeries(m_series);
@@ -483,6 +491,19 @@ void TableWidget::updateChartType(bool toggle)
m_barSeries = new QGroupedBarSeries();
+// QAxisCategories* xCategories = m_chart->axisX()->categories();
+// xCategories->insert(0, "Jeden");
+// xCategories->insert(1, "Dwa");
+// xCategories->insert(2, "Trzy");
+// xCategories->insert(3, "Cztery");
+// xCategories->insert(4, "Piec");
+// xCategories->insert(5, "szesc");
+
+ QStringList categories;
+ categories << "June" << "July" << "August" << "September" << "October" << "November";
+
+ m_chart->axisX()->categories()->insert(categories);
+
int first = 3;
int count = 6;
m_barMapper = new QVBarModelMapper;
@@ -495,10 +516,10 @@ void TableWidget::updateChartType(bool toggle)
// barSeries->setModelMapper(mapper);
m_chart->addSeries(m_barSeries);
- QStringList categories;
- categories << "June" << "July" << "August" << "September" << "October" << "November";
+// QStringList categories;
+// categories << "June" << "July" << "August" << "September" << "October" << "November";
- m_chart->axisX()->categories()->insert(categories);
+// m_chart->axisX()->categories()->insert(categories);
QList barsets = m_barSeries->barSets();
for (int i = 0; i < barsets.count(); i++) {