Skip to main content
ALomb
Senior
Aug 30, 2019 8:46 AM UTC
Solved

PieChart Resize

I refer to the source code for "Model UI Demo 1 TouchGFX".

I would like to enlarge the PieChart, but I can't figure out how to do it.

In the GraphView::setupScreen function I modified the values for center, height and width.

// GraphView.cpp - GraphView::setupScreen
 pieChartX = 0;
 pieChartY = -16;
 donutX = pieChartX;
 donutY = 34;
 pieChart.setPosition(pieChartX, pieChartY, 300, 300); /* <- modified */
 pieChart.setCenter(150, 150); /* <- modified */
 pieChart.setPieChart(0, 0, 0, 0);
 pieChart.recalculatePieChart();

However, the PieChart radius does not change.

how to do ?

//Antonello

This topic has been closed for replies.
ALomb
ALombBest answer
Senior
Aug 30, 2019 9:06 AM UTC

Solved!

Calls to startPieChartAnimation method must also be changed (toMinRadius toMaxRadius)

Thanks

//Antonello

2 replies

ALomb
ALombAuthorBest answer
Senior
Aug 30, 2019 9:06 AM UTC

Solved!

Calls to startPieChartAnimation method must also be changed (toMinRadius toMaxRadius)

Thanks

//Antonello

Martin KJELDSEN
Principal III
Sep 2, 2019 8:23 AM UTC

Great. Glad you found that :)

/Martin