Grouping in DataPointLabelConnectorConditionalFormatting

6 posts, 0 answers
  1. Derek
    Derek avatar
    7 posts
    Member since:
    May 2015

    Posted 21 Dec 2016 Link to this post

    Hello Forum

    I have a report that contains a pie chart and I want to use the datapointlabelconnector (the little line linking the % to the section of the pie chart) only for sections in the pie chart that are too small to fit the actual datapoint label.  

     

    The sections of the pie chart correspond to a series group in the graph.  The expression for the DataPointLabel is:

    = Sum(Abs(Fields.Exposure)) / CDbl(Exec('graph2', Sum(Abs(Fields.Exposure))))

     

    How can I write a conditional formatting expression for the "DataPointLabelConnectorConditionalFormatting" that will use label connectors only when the datapointlabel value is less than 5%?

     

    Thanks,
    Derek

  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 22 Dec 2016 Link to this post

    Hello Derek,

    Data point labels are positioned automatically in the available space of the Plot area. You can display the connectors through the series DataPointLabelConnectorStyle.Visible property and the series' DataPointLabelOffset.

    You can show/hide conditionally connectors through the series' DataPointLabelConnectorConditionalFormatting property based on fields, report parameters or other expression - Conditional Formatting.

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Derek
    Derek avatar
    7 posts
    Member since:
    May 2015

    Posted 22 Dec 2016 in reply to Stef Link to this post

    Hi Stef,

    Thank you for your reply.  The series sections in the pie chart are broken out by group - in my case the groups represent an industry sector (energy, health care, etc).  So the data point label in each section of the pie chart equals the sum of the exposure for that industry sector (the group) as a percentage of the overall exposure of the whole dataset.  I would like to use a connector when that percentage is less than 5%, because the actual section in the pie chart is then to slim to fit the data point label.

    The DataPointLabel value is:  

    = Sum(Abs(Fields.Exposure)) / CDbl(Exec('graph2', Sum(Abs(Fields.Exposure))))

    However, I get a failure when I use the below DataPointLabelConnectorConditionalFormatting:

    = Sum(Abs(Fields.Exposure)) / CDbl(Exec('graph2', Sum(Abs(Fields.Exposure)))) < 5

    Is there a way to apply the conditional formatting at the group level?

    Thanks,

    Derek

  4. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 23 Dec 2016 Link to this post

    Hello Derek,

    Connectors are rendered between the label and the bar(pie). If labels are positioned in the bar, they cannot be conditionally moved out of the bar - this is controlled by the series' DataPointLabelAlignment.

    Conditionally, you can show/hide the line/connector or style it (color, brush, padding).


    If you need to display the values, I can suggest the followng approaches:
    1. Provide more space for the Graph item, which will give more plot area;
    2. Hide the series' DataPointLabel (DataPointLabelStyle.Visible) and use the series' LegendItem.Value to display the desired information. Create also a distinguishable series' ColorPalette.
    3. Use the approach from point 2, where for very thin slices you can conditionally show the data point label outside the pie chart with connector. For other slices you can keep hiding data point labels and rely on the legend.


    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Derek
    Derek avatar
    7 posts
    Member since:
    May 2015

    Posted 05 Jan 2017 in reply to Stef Link to this post

    Hi Stef,

     

    Thanks for the clarification and suggestions.  Are there any plans on the product roadmap for the report designer application to allow conditional formatting of the series' DataPointLabelAlignment?  It seems like there would be a lot of bars/pies where the user would want to put the label on either the inside or outside of the bar/pie depending on the size of the section being labeled.

     

    Thanks,

    Derek

  6. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 05 Jan 2017 Link to this post

    Hi Derek,

    Please check the attached video illustrating how we build a Pie Chart with two separate BarSeries in the Graph.Series collection. The idea is to configure differently each BarSeries connectors and make big values to be displayed by the first BarSeries and the small values - by the second BarSeries. The filtration happens by using different SeriesGroups groups.

    Still the size is calculated automatically based on the available space for the chart's plot area. You will need to set the condition on which series are filtered to be displayed by each BarSeries.

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top