Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) the internal label position(Reporting.pieChart) (Read 10946 times)
cfn_zzq
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jun 7th, 2013
the internal label position(Reporting.pieChart)
Jun 7th, 2013 at 8:00am
Print Post  
How to set the internal label into the pie chart, and how to set the percentage with decimal point?
  

__25429___33719__002.PNG (Attachment deleted)
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: the internal label position(Reporting.pieChart)
Reply #1 - Jun 7th, 2013 at 10:33am
Print Post  
Have a look at this version:

https://mindfusion.eu/_temp/MindFusion.Reporting.Wpf.trial.zip

The PieChart class exposes two new properties that enable you to control the position of the chart labels, namely InnerLabelLocation and OuterLabelOffset.

InnerLabelLocation is a value in the interval [0..1] which specifies the relative location of the inner labels along the radius length. The default is 0.85, which positions the inner labels just outside the chart. You can try with smaller values, for example 0.5. OuterLabelOffset is an absolute value specifying the offset of the outer labels.

Specifying formatting for the displayed label values is currently not possible, but something we will consider adding in the next version of the control.

Regards,
Meppy
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Re: the internal label position(Reporting.pieChart)
Reply #2 - Jun 8th, 2013 at 1:37am
Print Post  
Meppy wrote on Jun 7th, 2013 at 10:33am:
Have a look at this version:

https://mindfusion.eu/_temp/MindFusion.Reporting.Wpf.trial.zip

The PieChart class exposes two new properties that enable you to control the position of the chart labels, namely InnerLabelLocation and OuterLabelOffset.

InnerLabelLocation is a value in the interval [0..1] which specifies the relative location of the inner labels along the radius length. The default is 0.85, which positions the inner labels just outside the chart. You can try with smaller values, for example 0.5. OuterLabelOffset is an absolute value specifying the offset of the outer labels.

Specifying formatting for the displayed label values is currently not possible, but something we will consider adding in the next version of the control.

Regards,
Meppy


Hi Meppy,

This is a colleague of mine, Can take me a newest official version of dlls?

Best Regards,
Luo Lishuang
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Re: the internal label position(Reporting.pieChart)
Reply #3 - Jun 9th, 2013 at 1:10am
Print Post  
Hi Meppy,

The PieChart in report could NOT be exported to Excel file?
any solution?


Best Regards,
Luo Lishuang
  
Back to top
 
IP Logged
 
luolishuang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Joined: Feb 22nd, 2013
Re: the internal label position(Reporting.pieChart)
Reply #4 - Jun 9th, 2013 at 1:51am
Print Post  
also,The PieChart exported to PDF file has a little problem, like image below, why the image in PDF file can NOT be consistent at source image?
  

source.PNG (Attachment deleted)
in_PDF.PNG (Attachment deleted)
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: the internal label position(Reporting.pieChart)
Reply #5 - Jun 9th, 2013 at 7:59am
Print Post  
Hi,

We were able to reproduce the bug with the PDF export and will look into it. Regarding exporting charts to excel, this is currently not supported, but we have plans to extend our excel exporter in the near (even though not immediate) future so you may stay tuned.

Regards,
Meppy
  
Back to top
 
IP Logged
 
cfn_zzq
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jun 7th, 2013
Re: the internal label position(Reporting.pieChart)
Reply #6 - Jun 17th, 2013 at 2:56am
Print Post  
In the pieChart,the A,B,C block color is red,the D block is blue, and the Other block is gray.How can i achieve it?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: the internal label position(Reporting.pieChart)
Reply #7 - Jun 17th, 2013 at 5:39am
Print Post  
You can assign brushes for the individual pie pieces through the PieChart.Brushes property. For example, you can do that in XAML like this:

Code
Select All
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:r="http://mindfusion.eu/reporting/wpf">
...
<x:ArrayExtension Type="{x:Type Brush}" x:Key="PieBrushes">
	<SolidColorBrush Color="#FF0000" />
	<SolidColorBrush Color="#FF0000" />
	<SolidColorBrush Color="#FF0000" />
	<SolidColorBrush Color="#0000FF" />
	<SolidColorBrush Color="#C0C0C0" />
	<SolidColorBrush Color="#C0C0C0" />
	<SolidColorBrush Color="#C0C0C0" />
	<SolidColorBrush Color="#C0C0C0" />
</x:ArrayExtension>
...
<r:PieChart Brushes="{StaticResource PieBrushes}"  /> 


Regards,
Meppy
  
Back to top
 
IP Logged
 
cfn_zzq
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jun 7th, 2013
Re: the internal label position(Reporting.pieChart)
Reply #8 - Jun 17th, 2013 at 8:52am
Print Post  
The property of PieChart Brushes is set by code. I don't know why it does not display?

myReport.QueryDetails += (s, e) =>
{
MindFusion.Reporting.Wpf.PieChart pieChart = s as MindFusion.Reporting.Wpf.PieChart;
if (item != null)
{
List<Brush> lst = new List<Brush>
{
new SolidColorBrush(Color.FromRgb(Convert.ToByte(110),Convert.ToByte(110),Convert.To
Byte(110))),
...
};
pieChart.Brushes = lst;
e.Details = ...
}
}
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: the internal label position(Reporting.pieChart)
Reply #9 - Jun 17th, 2013 at 9:40am
Print Post  
More appropriate place to customize appearance would be the Prerender event. There you can directly customize the appearance properties of the rendered PieChart:

Code
Select All
var pieChart = e.RootVisual as MindFusion.Charting.Wpf.PieChart;
if (pieChart != null)
{
	pieChart.Series[0].Fills.Clear();
	pieChart.Series[0].Fills.Add(new SolidColorBrush(Color.FromRgb(110, 110, 110)));
} 


Note that RootVisual is an instance of MindFusion.Charting.Wpf.PieChart and not the original MindFusion.Reporting.Wpf.PieChart report item.

Regards,
Meppy
  
Back to top
 
IP Logged
 
cfn_zzq
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jun 7th, 2013
Re: the internal label position(Reporting.pieChart)
Reply #10 - Jun 18th, 2013 at 2:49am
Print Post  
Thanks for your help.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint