This is a migrated thread and some comments may be shown as answers.

How to reduce bubble size

6 Answers 140 Views
Chart
This is a migrated thread and some comments may be shown as answers.
guillaume cros
Top achievements
Rank 1
guillaume cros asked on 20 Jul 2010, 10:58 AM
Hello,

I have a project with a RadGridview and a RadChart. I have the correct data in my chart and my grad.

I d'ont find how to reduce bubbles size for all points in my chart. Just find for one Point with DataPoint.BubbleSize.

I tried a second solution with this example : http://www.telerik.com/help/silverlight/chart-customize-chart-series-appearance-itemstyle.html

But i want use this form of Path with Binding my DataItem:
<Canvas>
  <Path Fill="Gold" Stroke="Black" StrokeThickness="1">
    <Path.Data>
      <EllipseGeometry Center="50,50" RadiusX="50" RadiusY="50" />
    </Path.Data>
  </Path>
</Canvas>

unfortunately, i don't have the good result.

Someone have an idea?

6 Answers, 1 is accepted

Sort by
0
Accepted
Giuseppe
Telerik team
answered on 20 Jul 2010, 12:26 PM
Hello guillaume cros,

There is no global API that would allow you to control the bubble size for all data points, however, you can check the Scatter series type that might suit your needs better (the scatter points are smaller by default and their size can be controlled via the ScatterSeriesDefinition.PointSize property).

Hope this helps.


Sincerely yours,
Freddie
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
guillaume cros
Top achievements
Rank 1
answered on 20 Jul 2010, 01:16 PM
Thanks a lot for your answer! It's perfect :)
0
jfkrueger
Top achievements
Rank 1
answered on 08 Aug 2011, 08:13 PM
Why does the ItemMapping for BubbleSize have no effect? No matter what value is passed, all the bubbles are the same size...

<telerik:RadChart x:Name="RadChartCostAndQualityIndex">
            <telerik:RadChart.SeriesMappings>
                <telerik:SeriesMapping LegendLabel="Bubble Series 1" CollectionIndex="0" ItemsSource="{Binding CostAndQualityIndexData}">
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:BubbleSeriesDefinition />
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:SeriesMapping.ItemMappings>
                        <telerik:ItemMapping FieldName="OverallCostIndex" DataPointMember="YValue" />
                        <telerik:ItemMapping FieldName="OverallQualityIndex" DataPointMember="XValue" />
                        <telerik:ItemMapping FieldName="BubbleSize" DataPointMember="BubbleSize" />
                    </telerik:SeriesMapping.ItemMappings>
                </telerik:SeriesMapping>
            </telerik:RadChart.SeriesMappings>
        </telerik:RadChart>

Thanks!
0
Giuseppe
Telerik team
answered on 10 Aug 2011, 10:33 AM
Hello there,

We were unable to reproduce the problem you are experiencing in our local tests and BubbleSize works as expected -- we have attached a runnable sample application as well.

Also, please note that you can control the bubble size presentation by three properties of the BubbleSeriesDefinition class:
  • BubbleSizeRelative -- Gets or sets a value indicating whether the bubble size should be relative to the available ChartArea, or should be interpreted as an absolute value in device-independent pixels (by default this is set to true).
  • BubbleSizeRepresents -- Gets or sets a value indicating whether the bubble size should be interpreted as the bubble diameter  or as the bubble area (by default is interpreted as diameter).
  • CustomScaleFactor -- Gets or sets a value indicating a custom scale factor that should be applied to the bubble dimensions.

Hope this helps.


Greetings,
Giuseppe
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
jfkrueger
Top achievements
Rank 1
answered on 10 Aug 2011, 05:46 PM
I figured it out... I needed to set some more properties on the series definition:

<telerik:SeriesMapping.SeriesDefinition>
    <telerik:BubbleSeriesDefinition BubbleSizeRepresents="Diameter" 
                                    BubbleSizeRelative="False"
                                    ShowItemToolTips="True" />
</telerik:SeriesMapping.SeriesDefinition>

Thank you!
0
jfkrueger
Top achievements
Rank 1
answered on 10 Aug 2011, 05:48 PM
And as far as reducing the bubble size...just include a field for the value in the data and map that to the BubbleSize property. Works like a charm.

<telerik:SeriesMapping.ItemMappings>
        <telerik:ItemMapping FieldName="OverallCostIndex" DataPointMember="YValue" />
        <telerik:ItemMapping FieldName="OverallQualityIndex" DataPointMember="XValue" />
        <telerik:ItemMapping FieldName="BubbleSize" DataPointMember="BubbleSize" />
        <telerik:ItemMapping FieldName="ProviderName" DataPointMember="Tooltip" />                        
    </telerik:SeriesMapping.ItemMappings>
Tags
Chart
Asked by
guillaume cros
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
guillaume cros
Top achievements
Rank 1
jfkrueger
Top achievements
Rank 1
Share this question
or