Profile Picture

Problem with bubble chart

Posted By shashikant bonigala 15 Years Ago
Author
Message
Milen Metodiev
Posted 15 Years Ago
View Quick Profile
Forum Member

Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)

Group: Nevron Team
Last Active: 14 Years Ago
Posts: 48, Visits: 1

Hi Shashikant,

Unfortunately I wasn't able to reproduce the problem. What are the min and max values for pieSize ?

Best Regards,
Milen Metodiev



shashikant bonigala
Posted 15 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 15 Years Ago
Posts: 2, Visits: 1

Thanks Bob for replying to the query....

The requirement has changed a bit now, i need to show a pie chart now instead of a bubble chart, i need to plot 12 different values for each pie and update the pie's radius/size every 2 secs with these different values. The problem that i am facing now is that the pie's radius/size resets after the 6th value , but according to the values provided to the pie the size should increase for 12 iterations.

 

PFB the source code(Where pieSize variable contains the value pertaining to the size...)

NChart chart = null;

NSeries series = null;

chart = new NPieChart();

NPieSeries pie = (NPieSeries)chart.Series.Add(SeriesType.Pie);

pie.PieStyle = PieStyle.Pie;

pie.Radius = new NLength(Convert.ToSingle(pieSize), NRelativeUnit.RootPercentage);

//chart.Width = Convert.ToSingle(pieSize/100);

pie.InflateMargins = false;

series = pie;

Interestingly, I tried to reduce the number of iterations to 6 , then the observed behaviour is that the size increases for 3 values and then the size if reset again...

In asyncrefresh i have written the following code:-

chart.Series.Clear();

// add a master point series

NPointSeries pointSeries = (NPointSeries)chart.Series.Add(SeriesType.Point);

pointSeries.UseXValues = true;

pointSeries.InflateMargins = false;

pointSeries.DataLabelStyle.Visible = false;

//pointSeries.Size = new NLength(12, NRelativeUnit.ParentPercentage);

pointSeries.FillStyle = new NColorFillStyle(Color.Gainsboro);

Hope you understood the above described problem.Thanks in Advance...

 

Shashikant



bob milanov
Posted 15 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

Hi,

The bubble size is controlled by the MinSize and MaxSize properties of the bubble series and is specified in model units.

 

bubbleSeries.MinSize = 3.5f;
bubbleSeries.MaxSize = 13.5f;

Note that the bubble series in general will map the minimum size in model units to the minimum value specified in the bubbleSeries.Sizes collection and the maximum size to the maximum size respectively. For more information you can also check out the documentation of the component. This is by design.

 

If the requirement is to simply have points with different size you can add different point series. In this case the size is controlled through the Size property accepting values in NLenght format. For example:

 

pointSeries.Size = new NLength(20, NGraphicsUnit.Point0);

 

Hope this helps - let me know if you have any questions or meet any problems.

 

Best regards,
Bob



shashikant bonigala
Posted 15 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 15 Years Ago
Posts: 2, Visits: 1

Hi, I am currently using the evaluation version of the Nevron chart control for ASP.net. I need to show a bubbles chart, where in the size of the bubbles will change say every 2 secs. I have managed to implement the same. But the problem that i am facing is that the bubbles size doesn't remain consistent with the values provided to it,  even after giving values which only increase every 2 secs, the size of the bubbles keeps increasing and decreasing, which should not happen according to the values provided for the bubble size.

If I plot say 6 bubbles and try to update the size of these bubbles every 2 s, the size of the first and the last bubble stays constant and doesn't change, whereas the remaining 4 bubbles size increases and decreases. This behavior suggests that the size of the bubbles increases and decreases relative to the size of the first and the last plotted bubble.

 Please let me know how to control the size of the bubbles and how to correctly set the bubble size. I am using the below code:-

 

public override void OnAsyncRefresh(string webControlId, System.Web.HttpContext context, NStateObject state, EventArgs args)
   {
    NChartSessionStateObject chartState = state as NChartSessionStateObject;
    NRootPanel rootPanel = chartState.Document.RootPanel;
    NBubbleSeries bubblechart= (NBubbleSeries)chartState.Document.RootPanel.Charts[0].Series[0];

...

...

bubblechart.ClearDataPoints();

...

bubblechart.AddDataPoint(new NBubbleDataPoint(15, value, "value1"));

}

 

Thanks





Similar Topics


Reading This Topic