or
BarSeries series = new BarSeries();
series.CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "Name" };
series.ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Value" };
series.ShowLabels = true;
series.ItemsSource = points;
My ItemsSource is just a list of my datapoint class.
How do I set the label for each point?
I can do it via xaml easy enough. How about code?
<telerik:CategoricalDataPoint Category="1" Value="0.05" Label="Some Point Specific Text">
I tried and failed with
<telerik:BarSeries.LabelDefinitions >
<telerik:ChartSeriesLabelDefinition >
<telerik:ChartSeriesLabelDefinition.Template>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding}"></TextBlock>
<TextBlock>
<TextBlock.Text>
<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type telerik:BarSeries}}"
Path="DataPoints[0].DataItem.MyLabelProp"/>
</TextBlock.Text>
</TextBlock>
</StackPanel>
</DataTemplate>
</telerik:ChartSeriesLabelDefinition.Template>
</telerik:ChartSeriesLabelDefinition>
</telerik:BarSeries.LabelDefinitions>
Hi,
I’m using RadRichText and I’m trying to move the caret to specific offset from the start of the document (or specific row and column).
I saw on the forum that in order to move the caret I need to use
richTextBox.Document.CaretPosition.MoveToPosition
That gets DocumentPosition as parameter. But I can’t create documentPosition from desired text position.
How can I set the caret position from the beginning of the document?
By the way,
The Document position API help page doesn’t work.
Thanks,
Rotem.
<
telerik:RadTimeBar
Grid.Row
=
"2"
x:Name
=
"radTimeBar"
>
<
telerik:RadTimeBar.Intervals
>
<
telerik:HourInterval
/>
<
telerik:MinuteInterval
/>
<
telerik:SecondInterval
/>
<
telerik:MillisecondInterval
/>
</
telerik:RadTimeBar.Intervals
>
</
telerik:RadTimeBar
>
class
ResourceItem
{
public
Dictionary<
int
,
double
> NumericalResourceValues
{
get
{
return
numericalResourceValues ?? (numericalResourceValues =
new
Dictionary<
int
,
double
>()); }
}
public
Dictionary<
int
,
double
> numericalResourceValues;
}
class
Resource
{
public
ObservableCollection<ResourceItem> ResourceItems {
get
;
set
; }
}
void populateTimeBar()
{
int
startTimeColumnIndex = 1;
int
dataColumnIndex = 1;
var resourceParser =
new
ResourceParser();
Resource resource = resourceParser.PaserResourceFile(Constants.LogFilePath);
var rasl =
new
RadAreaSparkline
{
ItemsSource = resource.ResourceItems,
XValuePath =
"NumericalResourceValues["
+ startTimeColumnIndex +
"]"
,
YValuePath =
"NumericalResourceValues["
+ dataColumnIndex +
"]"
};
this
.radTimeBar.Content = rasl;
this
.radTimeBar.DataContext = resource.ResourceItems;
}