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. Image for the cookie policy date

Regarding seperate chart series in a chart control

Hi All

I am using syncfusion version 4.4.0.51

I am showing multiple chart series in a chart control , so that each chart series size will determine by runtime only based on number of series and chart bounds height, below is my code

float height = this.Chart.ChartArea.RenderBounds.Height / (count + 1) - 10;

series.ChartSeries.YAxis.AutoSize = false; series.ChartSeries.YAxis.Size = new SizeF(0, height);

the above code will be called inside the "chartlayout_completed" event

the code throwing stack overflow exception

Can anyone help me... How do i achieve this ?

or How to avoid exception.

reply ASAP.

Thanks and Regards
K.Sathishkumar.

16 Replies

AD Administrator Syncfusion Team December 18, 2006 05:16 PM UTC

Hi Sathish,

Thanks for your update.

While showing multiple chart series in a chart control, it is possible to set Chart Area size automatically based on the chart series size at runtime using ChartControl’s ‘BeginUpdate()’ and ‘EndUpdate()’ functions.

Please find the sample attached.

Dynamic Chart size sample

Let me know if this helps.

Thank you for choosing Syncfusion products.

Best Regards,
Sureshbabu


SK Sathishkumar Kaliavaradhan December 22, 2006 12:51 PM UTC

Hi Sureshbabu

I want chart series in "Y" Axis with seperate series each with

chartseries1 from 320 to 280
chartseries2 from 270 to 230
chartseries3 from 220 to 180

Like that i want set in runtime

How can i achieve ?

Please send me sample

With Regards
K.Sathishkumar


AD Administrator Syncfusion Team December 22, 2006 07:17 PM UTC

Hi Sathish,

Here is a sample which will help you to add series with dynamic data and to remove the series.

Dynamic Chart size sample

Please let me know if this sample helps.

Thanks for using Syncfusion products.

Best Regards,
Sureshbabu


SK Sathishkumar Kaliavaradhan January 3, 2007 05:33 AM UTC

Hi suresh,

i don't know you got my reguirement or not, because i asking chart series in stacking model but you giving example in ordinary chart series add and remove only,

my last mail i mentioned example for stacking model also

chartseries1 height from 320 to 280
chartseries2 height from 270 to 230
chartseries3 height from 220 to 180

set by runtime based on total height of chart and number of series

can you please try to understand my reguirement and then send me sample if it is possible

With Regards
K.Sathishkumar



SB Suresh Babu Syncfusion Team January 3, 2007 06:23 PM UTC

Hi Sathish,

Kindly have a look at the sample attached which will help you to resize the height of Chart and number of series.

Column Range Chart sample

Please let me know whether it meets your requirement. If not, then provide me a screen shot or sample as you expect.

Thanks for your patience.

Regards,
Sureshbabu


SK Sathishkumar Kaliavaradhan January 4, 2007 02:03 PM UTC

Hi Suresh,

I don't have screen shots right now but i tell you my reguirement

I have chart control in that user can configure number of chart series at runtime (say suppose 3 chart series or may be two ) and i am showing the chart series in stacking model (means seperate chart series one by one in "Y" axis)so that i have to allocate same space in "Y" axis each series , so that i was tried to get the height chart of chart control and get sum of chart series

Each series primary "Y" axis scaling height is set by runtime below is my calculation

Each series primary "Y" axis scaling height = Height of chart / number of series

float height = this.Chart.ChartArea.RenderBounds.Height / (count + 1) - 10; series.ChartSeries.YAxis.Size = new SizeF(0, height);

this code will be called inside layout_completed event that is it but this code throwing stackfull exception for me but same code working in 4.4.0.50 but exception in 4.4.0.51

can you please try to understand my problem and tell me how do i solve ?

With Regards
K.Sathishkumar.




SB Suresh Babu Syncfusion Team January 5, 2007 01:18 AM UTC

Hi Sathish,

Currently i am working into this issue with high priority.

Please give me one more day to update you.

Let me know if you have any further concerns.

Thanks and Regards,
Sureshbabu


SB Suresh Babu Syncfusion Team January 5, 2007 11:32 PM UTC

Hi Sathish,

I regret very much for the delay in my response.

Please take a look into the sample attached which will help you to set chart axis height by selecting number of series to create a chart like Stacked Y axes chart.

Multiple Stacked Y Axes sample

Please let me know if you have any further questions.

Thanks for your patience.

Regards,
Sureshbabu


SK Sathishkumar Kaliavaradhan January 8, 2007 06:44 AM UTC

Hi suresh,

whatever example you gave for stack model chart is not stack model.

i don't know you got my reguirement or not but

I repeating the same

1)Actually my problem is to avoid stack overflow exception while setting the axis size in runtime

if possible then only send me the sample and remember "setting the axis size by run time in layout_completed event"

With Regards
K.Sathishkumar

MultipleYAxes.zip


SB Suresh Babu Syncfusion Team January 8, 2007 08:43 PM UTC

Hi Sathish,

Sorry for the inconveniences caused.

Please send me the sample which reproduces the issue. It will be easy to solve the issue quickly.

Thanks in advance.

Regards,
Sureshbabu


SK Sathishkumar Kaliavaradhan January 11, 2007 09:11 AM UTC

HI Sureshbabu,

I attached my problem code

Please look in to my code and solve this problem and reply me ASAP.

With Regards
Sathishkumar.

StackOverFlowExceptionIssue0.zip


SK Sathishkumar Kaliavaradhan January 11, 2007 02:30 PM UTC

Hi Sureshbabu,

Please run my code attached in previous post , see that it will throws stackoverflow exceptions in setaxis() function

Actually i am using the layoout_compeleted event for allocating space for axis because while form resize then event will fire and get latest height of the chart control then based on height i will allocate to series axis.please run my code and resize the form,see the error

Please correct this problem me as soon as possible because very very urgent for me.

With Regards
K.Sathishkumar


SB Suresh Babu Syncfusion Team January 12, 2007 12:44 AM UTC

Hi Sathish,

Thanks for using Syncfusion products.

I am able to reproduce this issue and I am working into this issue.

I will update you with in 24 hours.

Please let me know if you have any more questions.

Regards,
Sureshbabu


SK Sathishkumar Kaliavaradhan January 12, 2007 04:30 AM UTC

Hi Sureshbabu,

For your information again attaching the same example with some modification please look into the code

I hope now you understood my problem why i am doing that way

Please run and correct my problem reply me as soon as possible because very urgent for me

Waiting for your reply.

Thanks and Regards
K.Sathishkumar

StackOverFlowExceptionIssue1.zip


SK Sathishkumar Kaliavaradhan January 12, 2007 10:17 AM UTC

Hi SureshBabu,

I am waiting for your update only , So please solve this problem as soon as possible.

With Regards
K.Sathishkumar.


SB Suresh Babu Syncfusion Team January 12, 2007 06:32 PM UTC

Hi Sathish,

Sorry for the delay in updating you.

I have tried a simple condition while calling Layout_completed event. It worked well.

Please take into the samples attached for more information.
Modified Stack Over flow Exception sample

Please let me know if this sample helps.

Thanks,
Sureshbabu

Loader.
Live Chat Icon For mobile
Up arrow icon