We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change bubble size of chart as per data associated with it

Thread ID:

Created:

Updated:

Platform:

Replies:

120119 Sep 2,2015 07:01 AM UTC Sep 3,2015 05:17 AM UTC ASP.NET MVC 1
loading
Tags: Chart
Ameya Deshpande
Asked On September 2, 2015 07:01 AM UTC

this is my code where I am fetching data from database and then binding it to bubble chart
now what i want is to change size of bubble as per the size of data changes. The data can be anything it starts from 1 to a millions not able to give exact size of data to size. please suggest

sr.Points(pt =>
                        {
                            foreach (KeyValuePair<String, Double> pair in series)
                            {
                                pt.X(pair.Key).Y(pair.Value).Size(????).Add();
                            }
                        }
                       ).Name(seriesName)
                         .Type(SeriesType.Bubble)
                         .Fill(Utility.getColor(counter))
                         .EnableAnimation(true)
                         .Tooltip(tt =>
                          tt.Visible(true)
                          )
                         .Add();

Deepaa Pragaasam [Syncfusion]
Replied On September 3, 2015 05:17 AM UTC

Hi Ameya,
Thanks for contacting Syncfusion Support. We have analyized your query.
The bubble size can be set according to your requirement.
Example:
When there are millions of data, you can specify the bubble size of first thousand points in a particular size and next thousand points in another size.
We have provided a sample with the datasource containing XValues , YValues and Size of the bubble.
The bubble size also varies according to the chart size. When the width of the chart is less ,the size of the bubble also becomes less due to the responsive behavior of the bubble chart.

Please refer the below sample for your reference
WebApplication1
Code Snippet:
[MVC]

sr.DataSource((IEnumerable<object>)ViewBag.dataSource).XName("xValues").YName("yValues1")  

.Size("size").Type(SeriesType.Bubble).Add();


ScreenShots :
Bubble chart rendered with the size specified in the database with  chart width of 1140 px.

Bubble size when the chart width is given as 400px.

Regards,
Deepaa.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;