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

PointMark Visibility For Start and End of data set

1 Answer 42 Views
Chart
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 27 Mar 2011, 11:58 PM
Hi there,

I've gone through the examples I could find for point mark visibility, but could not get it to work. I have a chart with two series mappings: (i) BarSeriesDefinition and (ii) LineSeriesDefinition. In the LineSeriesDefinition I only want to display the PointMark in the first and last PointMark in the data set as the FieldName "Target" value does not change.

Here is what I have:
<telerik:RadChart x:Name="radChart" ItemsSource="{Binding CounterValues}">
  <telerik:RadChart.DefaultView>
    <telerik:ChartDefaultView>
      <telerik:ChartDefaultView.ChartTitle>
        <telerik:ChartTitle Content="Counter Data" />
      </telerik:ChartDefaultView.ChartTitle>
      <telerik:ChartDefaultView.ChartArea>
        <telerik:ChartArea>
          <telerik:ChartArea.AxisX>
            <telerik:AxisX IsDateTime="True" Step="1" LabelStep="1" DefaultLabelFormat="dd-MMM" StepLabelLevelCount="1" StepLabelLevelHeight="1" />
          </telerik:ChartArea.AxisX>
        </telerik:ChartArea>
      </telerik:ChartDefaultView.ChartArea>
    </telerik:ChartDefaultView>
  </telerik:RadChart.DefaultView>
  <telerik:RadChart.SeriesMappings>
    <telerik:SeriesMapping LegendLabel="Counter Values">
      <telerik:SeriesMapping.SeriesDefinition>
        <telerik:BarSeriesDefinition/>
      </telerik:SeriesMapping.SeriesDefinition>
      <telerik:SeriesMapping.ItemMappings>
        <telerik:ItemMapping DataPointMember="YValue" FieldName="CounterValue" />
        <telerik:ItemMapping DataPointMember="XValue" FieldName="Day" />
      </telerik:SeriesMapping.ItemMappings>
    </telerik:SeriesMapping>
    <telerik:SeriesMapping LegendLabel="Target">
      <telerik:SeriesMapping.SeriesDefinition>
        <telerik:LineSeriesDefinition/>
      </telerik:SeriesMapping.SeriesDefinition>
      <telerik:SeriesMapping.ItemMappings>
        <telerik:ItemMapping DataPointMember="YValue" FieldName="Target" />
        <telerik:ItemMapping DataPointMember="XValue" FieldName="Day" />
      </telerik:SeriesMapping.ItemMappings>
    </telerik:SeriesMapping>
  </telerik:RadChart.SeriesMappings>
</telerik:RadChart>


Can you please let me know how to do this?

1 Answer, 1 is accepted

Sort by
0
Accepted
Sia
Telerik team
answered on 30 Mar 2011, 05:04 PM
Hi David,

I am not sure I understand your question properly. There are two possible solutions of your problem:

  1. If your line values does not change in the middle data points, you can just add Line with two data points - the start value and the end value.
  2. If you need to hide some of the point marks, please check the following help topic.

Please let me know if this helps you.

Regards,
Sia
the Telerik team
Tags
Chart
Asked by
David
Top achievements
Rank 1
Answers by
Sia
Telerik team
Share this question
or