From 2f36b74b4262bb3b789f59e5c7af63626bfa3f95 2012-08-29 12:15:54 From: Jani Honkonen Date: 2012-08-29 12:15:54 Subject: [PATCH] fine tuning donutbreakdownchart --- diff --git a/examples/donutbreakdown/donutbreakdownchart.cpp b/examples/donutbreakdown/donutbreakdownchart.cpp index a5b8e6a..210e710 100644 --- a/examples/donutbreakdown/donutbreakdownchart.cpp +++ b/examples/donutbreakdown/donutbreakdownchart.cpp @@ -31,10 +31,9 @@ void DonutBreakdownChart::addBreakdownSeries(QPieSeries *breakdownSeries, QColor breakdownSeries->setHoleSize(0.7); breakdownSeries->setLabelsVisible(); foreach (QPieSlice *slice, breakdownSeries->slices()) { - color = color.lighter(110); + color = color.lighter(115); slice->setBrush(color); slice->setLabelFont(QFont("Arial", 8)); - slice->setLabelArmLengthFactor(0.05); } // add the series to the chart diff --git a/examples/donutbreakdown/main.cpp b/examples/donutbreakdown/main.cpp index beda28c..d6c187e 100644 --- a/examples/donutbreakdown/main.cpp +++ b/examples/donutbreakdown/main.cpp @@ -13,23 +13,23 @@ int main(int argc, char *argv[]) // Data from http://www.stat.fi/til/ekul/2010/ekul_2010_2011-12-13_tie_001_en.html QPieSeries *series1 = new QPieSeries(); - series1->setName("Fossil"); + series1->setName("Fossil fuels"); series1->append("Oil", 353295); - series1->append("Wood", 319663); series1->append("Coal", 188500); series1->append("Natural gas", 148680); series1->append("Peat", 94545); QPieSeries *series2 = new QPieSeries(); - series2->setName("Renewable"); + series2->setName("Renewables"); + series2->append("Wood fuels", 319663); series2->append("Hydro power", 45875); series2->append("Wind power", 1060); QPieSeries *series3 = new QPieSeries(); - series3->setName("Other"); + series3->setName("Others"); series3->append("Nuclear energy", 238789); series3->append("Import energy", 37802); - series3->append("Others", 32441); + series3->append("Other", 32441); //![1] //![2]