Plot Strings on the X-Axis

Posted 4 years ago by Avatar Dave


I am having a simple chart with some datapoints:

<charts:XYChart x:Name="diagram" GridLineMajorVisibility="Y" Height="340" Width="640" Padding="20" IsEnabled="True">
<charts:XYChart.YAxes >
<charts:XYDoubleAxis x:Name="Y"
Minimum ="0"
TickMajorInterval="1" TickMinorInterval="0.25">
<charts:XYRange x:Name="test0" Minimum="0.5" Maximum="10" Background="#33D3D3D3" />
<charts:XYRange x:Name="test1" Minimum="0.25" Maximum="0.5" Background="#33808080" />
<charts:XYRange x:Name="test2" Minimum="-0.1" Maximum="0.25" Background="#33000000"/>

<charts:XYChart.XAxes >
<charts:XYDoubleAxis x:Name="X"
AreMinorTicksVisible="false" >


<charts:ScatterSeries ItemsSource="{Binding Path=ChartObjects}"



I will get following Error:

1.Error type:

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='ActiproSoftware.Windows.Controls.Navigation.ZoomDecorator', AncestorLevel='1''. BindingExpression:Path=ZoomLevelAnimated; DataItem=null; target element is 'ScaleTransform' (HashCode=43616934); target property is 'ScaleX' (type 'Double')

Is it because i am using strings to plot on the x-Axis instead of numeric values?

Is this error the reason why i cannot hide the labels and the ticks of the X-Axis?



I am using Version 14.1.0602

[Modified 4 years ago]

Comments (3)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Dave,

The error there seems to be indicating a binding error within the containing zoom container control, not within the chart. 

That being said, if you are trying to put string X data into an XYDoubleAxis as you are, that could also be a problem.  If you wish to plot string data then you need to use an XYGroupedAxis instead.  Please check the Axes documentation topic for more information on that.

See if that helps fix the problem.  If not, please make a new simple sample project that shows the issue and email that to our support address.  Be sure to rename the .zip file extension so it doesn't get spam blocked.

Actipro Software Support
Posted 4 years ago by Dave


i fixed the problem.


Posted 3 years ago by Justin Klein

Could you post some info about how you fixed the issue?  I'm seeing this error too, in what seems to be the most simple example:


    <shared:ActiproLogo />

Information The latest build of this product (2018.1 build 0674) was released 1 month ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.