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

Data outside of maximum vertical axis plots to top-left corner

4 Answers 59 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 2
David asked on 18 Jan 2012, 03:12 PM
Hi,

I've found that plotting data with where the Y value is above the maximum vertical axis plots somewhere to the top-left corner of component (outside of the visible component). Here's an example:

XAML:
<Window
    x:Class="RadChartViewSimpleTest"
    xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
    xmlns:chartView="clr-namespace:Telerik.Windows.Controls.ChartView;assembly=Telerik.Windows.Controls.Chart"
    Width="300"
    Height="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <DataGrid
            ItemsSource="{Binding}" />
        <chart:RadCartesianChart
            Grid.Column="1">
            <chart:RadCartesianChart.HorizontalAxis>
                <chartView:LinearAxis />
            </chart:RadCartesianChart.HorizontalAxis>
            <chart:RadCartesianChart.VerticalAxis>
                <chartView:LinearAxis
                    Maximum="100" />
            </chart:RadCartesianChart.VerticalAxis>
            <chart:RadCartesianChart.Series>
                <chartView:ScatterLineSeries
                    x:Name="ScatterLineSeries1"
                    ItemsSource="{Binding}" />
            </chart:RadCartesianChart.Series>
        </chart:RadCartesianChart>
    </Grid>
</Window>

VB:
Imports Telerik.Windows.Controls
Imports Telerik.Windows.Controls.ChartView
 
Public Class RadChartViewSimpleTest
 
    Public Sub New()
        InitializeComponent()
 
        Dim Points As New List(Of Point)
        For i As Integer = 0 To 150 Step 5
            Points.Add(New Point(i, i))
        Next
        For i As Integer = 0 To 150 Step 5
            Points.Add(New Point(155 + i, i))
        Next
        Me.DataContext = Points
 
        Dim genericBinding As New GenericDataPointBinding(Of Point, Double)
        genericBinding.ValueSelector = Function(t As Point) t.X
        ScatterLineSeries1.XValueBinding = genericBinding
        genericBinding = New GenericDataPointBinding(Of Point, Double)
        genericBinding.ValueSelector = Function(t As Point) t.Y
        ScatterLineSeries1.YValueBinding = genericBinding
    End Sub
End Class

The chart has a maximum vertical (linear) axis of 100, however the data generated in code-behind plots from 0 to 150. The resulting graph ends up quite funky (and incorrect).

I've also noted that irrespective of what I set for "RangeExtendDirection" in the vertical linear axis, the maximum range is never extended and the minimum range is always extended, ie. RangeExtendDirection is always acts as Negative irrespective of the value I set it to.

Kind regards,
Dave.

ps. Love the new performance of the ChartView component!

4 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 23 Jan 2012, 08:45 AM
Hello Dave,

We are aware of this issue and our developers have already fixed it. Please, download and try our latest LIB, which should solve this problem.

Kind regards,
Nikolay
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
David
Top achievements
Rank 2
answered on 23 Jan 2012, 12:59 PM
Hi Nikolay,

I'm happy to report that the latest LIB (2011.3.1316.40) fixes the issue described, however I've now got a new problem that opening any XAML file in any project that contains a Telerik control in design view generates the following error in the XAML designer:

System.IO.FileLoadException
Could not load file or assembly 'Telerik.Windows.Controls, Version=2011.3.1316.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
   at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
   at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
   at MS.Internal.Metadata.ClrAssembly.GetRuntimeMetadata(Object reflectionMetadata)
   at Microsoft.Windows.Design.Metadata.AttributeTableContainer.<MergeAttributesIterator>d__c.MoveNext()
   at Microsoft.Windows.Design.Metadata.AttributeTableContainer.GetAttributes(Assembly assembly, Type attributeType, Func`2 reflectionMapper)
   at MS.Internal.Metadata.ClrAssembly.GetAttributes(ITypeMetadata attributeType)
   at MS.Internal.Design.Metadata.Xaml.XamlAssembly.get_XmlNamespaceCompatibilityMappings()
   at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata sourceAssembly)
   at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensions.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata source)
   at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()
   at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier)
   at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context)
   at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider, Boolean visitCodeModel)
   at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors)
   at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem()
   at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem()
   at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState()
   at MS.Internal.Host.PersistenceSubsystem.Load()
   at MS.Internal.Host.Designer.Load()
   at MS.Internal.Designer.VSDesigner.Load()
   at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
   at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)
   at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
   at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
   at MS.Internal.Host.Isolation.IsolatedDesigner.Load()
   at MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)

Is this an issue with this build? While I understand LIB are exactly that - internal builds that aren't production ready, what can I do to fix the original problem in this thread? Will there be a newer build that restores the XAML designer or what I can I do to resolve the issue with the 2011 Q3 SP1 release?

Kind regards,
Dave.
0
Nikolay
Telerik team
answered on 26 Jan 2012, 09:39 AM
Hi Dave,

We haven't been able to reproduce this error in our local tests. Please, find attached a sample application based on the code you've sent us that uses the same version of the LIB 2011.3.1316.40. It works as expected on our side, so perhaps we are missing some of the details of your scenario. It would be very helpful for us if you're able to give it a try and in case the issue persists modify it and send it back to us. You may also try the latest LIB, which version 2011.3.1323.40.

As for the fix, it will be included in the next official version, which would be our 2012 Q1 release, scheduled for mid february.

Regards,
Nikolay
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Per
Top achievements
Rank 1
answered on 26 Jan 2012, 09:47 AM
Hi Nikolay,

I updated to the latest LIB (2011.3.1323.40) which fixes the original issue and no longer generates an error in the XAML designer, so I'm happy to continue to use this LIB to resolve the original issue. I'm not sure what caused the error in the XAML designer (it even occurred in the sample code I posted above), but since this is now resolved in the latest LIB and these are fully supported releases, I'm happy with this outcome.

Many thanks to the developers and your support team for helping me with the original issue.

Kind regards,
Dave.
Tags
ChartView
Asked by
David
Top achievements
Rank 2
Answers by
Nikolay
Telerik team
David
Top achievements
Rank 2
Per
Top achievements
Rank 1
Share this question
or