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

ItemToolTip Problem with DataFormat

5 Answers 132 Views
Chart
This is a migrated thread and some comments may be shown as answers.
marcos
Top achievements
Rank 1
marcos asked on 10 Mar 2011, 05:39 PM
Hey,

I can't display the correct x-axis date value in the itemtooltip.
Here are the interesting facts for you...

I have a chart with thousands of points so i use:
<telerik:AxisX AutoRange="True"...


That's why in my ItemToolTip the first value works and the last not (because of this link this link):
<telerik:LineSeriesDefinition ItemToolTipFormat="#X --> #DATAITEM.Date or #DATAITEM.Date{MM/dd/yyyy}"...


But I can't use #X because it's from double type and the result is something like "42k" - but not a date!

What kind of solution you can offer for my problem? Is there a posibility to convert the double to string inside xaml?
(i can't use codebehind...)

P.S. Sorry but I realized to late that I've posted this thread in WPF - its for Silverlight!!!

5 Answers, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 15 Mar 2011, 10:20 AM
Hi marcos,

This usually gets handled by RadChart out of the box. Its weird it didn't work in your case. Can you please try setting the IsDateTime property of the data point and see if this helps?

Kind regards,
Vladimir Milev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
marcos
Top achievements
Rank 1
answered on 15 Mar 2011, 05:43 PM
Okay, so the solution might be easy... Where I have to set the isDateTime property? You can have a look at my xaml-code:

<telerik:RadChart ItemsSource="{Binding DetailData}" >
    <!-- define series -->
    <telerik:RadChart.SeriesMappings>
        <telerik:SeriesMapping LegendLabel="special Value">
            <telerik:SeriesMapping.SeriesDefinition>
                <telerik:LineSeriesDefinition ShowPointMarks="False" ShowItemLabels="False" ShowItemToolTips="True" 
                                              ItemToolTipFormat="Values #Y - #X - #X{dd.MM.yyyy} " />
            </telerik:SeriesMapping.SeriesDefinition>
            <telerik:SeriesMapping.ItemMappings>
                <telerik:ItemMapping DataPointMember="XValue" FieldName="DATE_DOUBLE" />
                <telerik:ItemMapping DataPointMember="YValue" FieldName="VALUE_NUMBER" />
            </telerik:SeriesMapping.ItemMappings>
        </telerik:SeriesMapping>
          
    </telerik:RadChart.SeriesMappings>
    <!-- legend stuff -->
    <telerik:RadChart.DefaultView>
        <telerik:ChartDefaultView>
            <telerik:ChartDefaultView.ChartLegend>
                <telerik:ChartLegend x:Name="myLegend" LegendItemMarkerShape="Hexagon" Header=" "/>
            </telerik:ChartDefaultView.ChartLegend>
              
            <telerik:ChartDefaultView.ChartArea>
                <telerik:ChartArea LegendName="myLegend">
                    <telerik:ChartArea.AxisX>
                        <telerik:AxisX IsDateTime="True" DefaultLabelFormat="dd.MM.yyyy" LabelRotationAngle="270" />
                    </telerik:ChartArea.AxisX>
                </telerik:ChartArea>
            </telerik:ChartDefaultView.ChartArea>
        </telerik:ChartDefaultView>
    </telerik:RadChart.DefaultView>
</telerik:RadChart>

Any Idea???

Thanks,
marcos
0
marcos
Top achievements
Rank 1
answered on 16 Mar 2011, 11:08 AM
Here you can see a screenshot of my itemtooltip:
ItemToolTipFormat="Values #Y - #X - #X{dd.MM.yyyy} "

0
Evgenia
Telerik team
answered on 18 Mar 2011, 09:26 AM
Hi marcos,

Your question was answered in this forum thread started by you.

Best wishes,
Evgenia
the Telerik team
0
Evgenia
Telerik team
answered on 18 Mar 2011, 09:51 AM
Hi marcos,

Your question was answered in this forum thread started by you. 

Best wishes,
Evgenia
the Telerik team
Tags
Chart
Asked by
marcos
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
marcos
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or