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

How to set a size-changed Point to center of the axes?

7 Answers 95 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Ersin
Top achievements
Rank 1
Ersin asked on 22 Nov 2010, 01:37 PM
I have some issues with Point Chart of your Ajax components. As you can see on my attachment, in a point chart, changing the point size loses it's center on the axes.

Also how can i disable or collapse the visibilty of the coordinate plate, axes of y=0 and x=0 ??

Thank you...

7 Answers, 1 is accepted

Sort by
0
Ersin
Top achievements
Rank 1
answered on 22 Nov 2010, 01:48 PM
I couldnt update my thread with another attachment adding on (is it a bug? or my browser settings cause this?) anyways, i reply with a more easy to tell attachment here...
0
Evgenia
Telerik team
answered on 24 Nov 2010, 03:11 PM
Hello Ersin,

I recommend that you use Bubble series as they allow separate chart items to have different bubble sizes without "loosing it's center on the axes". The size of the bubble is controlled through XValue2 for bubble size on X axis and respectively - YValue2 for bubble size on Y axis. You can create a bubble series just like this:
    <telerik:ChartSeries Name="Series 1" Type="Bubble">
        <Items>
            <telerik:ChartSeriesItem Name="Item 1" XValue="10" XValue2="2" YValue="5"
                YValue2="2">
            </telerik:ChartSeriesItem>
            <telerik:ChartSeriesItem Name="Item 2" XValue="10" XValue2="3" YValue="10"
                YValue2="3">
            </telerik:ChartSeriesItem>
            <telerik:ChartSeriesItem Name="Item 3" XValue="10" XValue2="4" YValue="15"
                YValue2="4">
            </telerik:ChartSeriesItem>
            <telerik:ChartSeriesItem Name="Item 4" XValue="10" XValue2="5" YValue="20"
                YValue2="5">
            </telerik:ChartSeriesItem>
        </Items>
    </telerik:ChartSeries>
</Series>
Because the size of the bubble depends on the X range and Y range you can use custom range to get proper view. This will cause the bubbles defined above to be circular:
<PlotArea>
    <XAxis AutoScale="False" MaxValue="30" MinValue="0" Step="5">
    </XAxis>
    <YAxis AutoScale="False" MaxValue="30" MinValue="0" Step="5">
    </YAxis>
</PlotArea>

To disable the lines shown on your picture you should turn off visibility for MajorGridLines like this:
RadChart1.PlotArea.YAxis.Appearance.MajorGridLines.Visible = false;

All the best,
Evgenia
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Ersin
Top achievements
Rank 1
answered on 24 Nov 2010, 07:03 PM
Hi, thank you for your advice but using bubble charts draw elipses not circles. Is there a way to draw circle only ?

Also setting majorgridlines visiblity to false doesnt work on the lines x=0 and y=0... These lines are still and Bold in style...

I'm in a hurry to overcome with these situations, any workarounds to draw circles respective to center of the axes??
 
Thank you for being quicker, making me save time and money...
0
Ersin
Top achievements
Rank 1
answered on 29 Nov 2010, 05:17 PM
I need quick answers please...
I have to come up with ideas, if these needs are not possible, just let me know...

thanks...
0
Evgenia
Telerik team
answered on 30 Nov 2010, 08:46 AM
Hi Ersin,

Indeed MajorGridLines for x=0 and y=0 are still visible even though their Visibility is turned off. You can disable them by setting their Color to Transparent like this:
RadChart1.PlotArea.YAxis.Appearance.Color = System.Drawing.Color.Transparent;
RadChart1.PlotArea.XAxis.Appearance.Color = System.Drawing.Color.Transparent;

As for the Bubble Series - The Bubble chart is an extension of the Point chart bu you'd better use Bubbles instead of Points as you can control changing the size of the bubbles accordingly to the center on the axes. If you want circular Bubbles - try  different values for XValue2 and YValue2. For example you can set XValue2 to 3.5 and YValue2 to 4. You can also change the axis range so that the chart applies your needs.

Kind regards,
Evgenia
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Ersin
Top achievements
Rank 1
answered on 06 Dec 2010, 08:44 PM
Hi Evgania,

As far as i've seen, setting the Axis color to transparent really works... Thanks for that...
And for a better circle to draw, ratio of 31,25:40 is better then 35:40

Ex:
ChartSeriesItem item1 = new ChartSeriesItem(4, 4, 1.25, 1.6);

gives a quite better look circle.
0
Evgenia
Telerik team
answered on 09 Dec 2010, 08:29 AM
Hello Ersin,

I'm glad that setting the Axis color to transparent helped you. Thanks for the note.

Greetings,
Evgenia
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Chart (Obsolete)
Asked by
Ersin
Top achievements
Rank 1
Answers by
Ersin
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or