ResInsight/ThirdParty/nightcharts
Ruben Manuel Thoms 87bc6acd65 Added a GUI theme selector in preferences and a new class for handling GUI changes.
Added a new feature for editing style sheets and variable colors and see immediately the result.
Made Qwt plots (and items) stylable.
Added icons, improved styling possibilities of QMinimizePanel, fixed minor bugs in RicThemeColorEditorFeature.
2020-09-25 14:32:06 +02:00
..
CMakeLists.txt System : Remove support for Qt4 2020-04-24 11:40:22 +02:00
nightcharts.cpp Added a GUI theme selector in preferences and a new class for handling GUI changes. 2020-09-25 14:32:06 +02:00
nightcharts.h #1173 Changed the legend text format in the pie chart 2017-02-13 08:44:29 +01:00
nightcharts.pri #1116 Added nightcharts pie plotting library 2017-01-23 12:59:24 +01:00
nightchartswidget.cpp #1116 Added nightcharts pie plotting library 2017-01-23 12:59:24 +01:00
nightchartswidget.h #1116 Added nightcharts pie plotting library 2017-01-23 12:59:24 +01:00
README.md #1116 Added nightcharts pie plotting library 2017-01-23 12:59:24 +01:00

Nightcharts

This class includes a drawing histogram, pies and pseudo 3D pies.
It has very simple API and high level usability.
http://qt-apps.org/content/show.php?action=content&content=132560

Licensed under LGPL 2.1

Example :

void MainWindow::paintEvent(QPaintEvent e*)
{
    QWidget::paintEvent(e);
    QPainter painter;
    QFont font;
    painter.begin(this);
    Nightcharts PieChart;
    PieChart.setType(Nightcharts::DPie);//{Histogramm,Pie,DPie};
    PieChart.setLegendType(Nightcharts::Round);//{Round,Vertical}
    PieChart.setCords(100,100,this->width()/1.5,this->height()/1.5);
    PieChart.addPiece("Item1",QColor(200,10,50),34);
    PieChart.addPiece("Item2",Qt::green,27);
    PieChart.addPiece("Item3",Qt::cyan,14);
    PieChart.addPiece("Item4",Qt::yellow,7);
    PieChart.addPiece("Item5",Qt::blue,4);
    PieChart.draw(&painter);
    PieChart.drawLegend(&painter);
}

3DPie example

How to use

  • Check out in any location (or add as a submodule)
  • Write into Your main .pro file:
include("path/to/nightcharts/nightcharts.pri")