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.
Unfortunately, activation email could not send to your email. Please try again.

removing axis

Thread ID:

Created:

Updated:

Platform:

Replies:

80871 Apr 30,2009 06:54 PM May 11,2009 02:27 AM WPF 5
loading
Tags: Chart
Administrator [Syncfusion]
Asked On April 30, 2009 06:54 PM

Does anyone know if there's a ways to hide the chart X an Y axis? When I don't specify them the chart seems to add them by default.

This is to essentially create a thumb of the full size series. As such, I need to remove all vertical and horizontal spacing between the chart and the chart area but am stuck with CharArea.AxesThickness being set locally by the ChartArea.

I tried setting CharArea.AxesThickness to 0,0,0,0 on loading of the chart (after it's set by the ChartArea) but that seems very brute force and I'm usure as to the problems this may cause elsewhere when the chart is rendered..

Any help would be appreciated,

Thanks


Pavithra J [Syncfusion]
Replied On May 1, 2009 02:21 AM

Hi SFL,

Thanks for your interest in Syncfusion products.

The horizontal and the vertical space between the Chart and the ChartArea can be removed by setting the property Margin with the appropriate value. For your reference we have created a sample and you could download from the below given link,


Sample illustrates Using Margin Property

Please let us know if you have further queries.

Regards,
Pavithra.J



Administrator [Syncfusion]
Replied On May 4, 2009 05:44 PM

Hi Pavithra,

Thanks for the post.

I had already removed all padding and margins I could think of but was still getting space between the Chart and ChartArea. In the example below (also attached) I add a simple chart to a window and set all margins and padding to zero but as you can see some light blue still outlines the chart so I would assume it's margin on the ChartArea or Padding on the Chart but both are set to 0....

I know this shouldn't be a big problem normally but if all we want is the graph and need to rely an it's with for overlaying something proportional on top, then spacing becomes a problem...

In the end, I was able to achieve what I wanted by making the margin negative and removing ElementMargin from ChartDockPanel but I doubt that's the right way to do it...

An alternative I'm considering is to put margins on the overlay but I'm not sure if the chart exposes the size of the spacing between the edge of the chart and start of the series...

Any help would be appreciated.

/SFL

== XAML below ==
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sync="http://schemas.syncfusion.com/wpf"
Title="Window1" Height="300" Width="300"
Margin="0"
Padding="0"
Background="Yellow"
>
Background="Orange"
>
VerticalAlignment="Stretch"
VerticalContentAlignment="Stretch"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
BorderThickness="0"
Margin="0"
Padding="0"
Background="LightBlue"
sync:ChartType.Spacing ="0"
>

CornerRadius="0"
BorderThickness="0"
BorderBrush="Transparent"
Margin="0"
Padding="0"
Background="Wheat"
>


























Window1.xaml_1afc10d8.zip

Pavithra J [Syncfusion]
Replied On May 5, 2009 12:25 AM

Hi SFL,

Thanks for your interest in Syncfusion products.

The way you have found by setting the Margin to Negative values is right. You could also see, that I have also used nagative values for Margin in my attached sample in the above thread.

Please let me know if you have further queries.

Regards,
Pavithra.J


Administrator [Syncfusion]
Replied On May 5, 2009 10:43 AM

Thanks Pavithra,

I thought you meant setting the margin to zero in your initial post, apologies for the mix-up.

Thanks for your help,

SFL


Pavithra J [Syncfusion]
Replied On May 11, 2009 02:27 AM

Hi SFL,

Thanks for your update.

Please let us know if you have further queries.

Thank you for choosing Syncfusion products.

Regards,
Pavithra.J


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.

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.

;