Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Using Label as marker in pie chart
posted

I need to display a pie chart without a legend. Therefore the marker will have to show the slice label rather than the value. Is this possible? So far this is the only thing stopping me purchasing.

 Appreciate you help. Thanks

  • 739
    posted

    Hi,

    To create pie slices with a text labels Marker has to be used and Format property.  This is an example:

    <igCA:XamChart View3D="False" x:Name="chart" Background="#FF243CDC" Margin="8,8,8,8">
          <!-- Series -->
                <igCA:XamChart.Legend>
                    <igCA:Legend Visible="False"/>
                </igCA:XamChart.Legend>
                <igCA:XamChart.Series>
                    <igCA:Series ChartType="Pie">
                    <igCA:Series.DataPoints>
                        <igCA:DataPoint Value="3" Fill="#FFD70005">
                         <igCA:DataPoint.Marker>
                          <igCA:Marker Format="Italy"/>
                         </igCA:DataPoint.Marker>
                        </igCA:DataPoint>
                        <igCA:DataPoint Value="5" Fill="#FF6CA224">
                         <igCA:DataPoint.Marker>
                          <igCA:Marker Format="Spain"/>
                         </igCA:DataPoint.Marker>
                        </igCA:DataPoint>
                        <igCA:DataPoint Value="4" Fill="#FF076CB0">
                         <igCA:DataPoint.Marker>
                          <igCA:Marker Format="France"/>
                         </igCA:DataPoint.Marker>
                        </igCA:DataPoint>
                        <igCA:DataPoint Value="7" Fill="#FFE6BE02">
                         <igCA:DataPoint.Marker>
                          <igCA:Marker Format="China"/>
                         </igCA:DataPoint.Marker>
                        </igCA:DataPoint>
                        <igCA:DataPoint Value="5" Fill="#FF543792">
                         <igCA:DataPoint.Marker>
                          <igCA:Marker Format="Portugal"/>
                         </igCA:DataPoint.Marker>
                        </igCA:DataPoint>
                    </igCA:Series.DataPoints>
                        </igCA:Series>             
                </igCA:XamChart.Series>
       <igCA:XamChart.Scene>
        <igCA:Scene>
         <igCA:Scene.GridArea>
          <igCA:GridArea Margin="10,10,10,10" MarginType="Percent"/>
         </igCA:Scene.GridArea>
        </igCA:Scene>
       </igCA:XamChart.Scene>
      </igCA:XamChart>

     

    Thanks,

    GoranS