Discussion:
[Wt-interest] WPieChart
Mario Diethelm Guallar
2015-09-23 14:46:17 UTC
Permalink
Hi guys,

I was trying to adjust the labels font for a set of pie charts that I
need to include on my application (ie. reduce or increase the size and
use different font styles), but I didn't find a direct way to do it, so
I solved the problem adding a setLabelsFont function (with the
corresponding labelsFont function) to the WPieChart class.

The setLabelsFont function just set a WPieChart class's private data
member (WFont *labelsFont_). At WPieChart construction time, lablesFont_
is initialized to 0 (nullptr). Finally I added the following lines to
paintEvent function:

if (labelsFont_)
painter.setFont(*labelsFont_);

Is there a direct way to set the label font for a WPieChart object? I
have attached the modified WPieChart.c and WPieChart source files.

Thanks. Regards.

________________________
Mario Diethelm Guallar

Loading...