Hi,
I eventually got it going - but I have another question - is it possible to change the TrackBall Item template based on the current value)? i.e showing a different image on the trackball label depending on the value in the y axis?
Kind Regards,
Raymond
|
<ResourceDictionary>
<local:ImageConverter x:Key="imageConverter" />
<DataTemplate x:Key="trackballTemplate">
<StackLayout Orientation="Horizontal" Spacing="0">
<Label Text="{Binding YValue}" VerticalOptions="Center" FontSize = "15" />
<Image Source="{Binding YValue, Converter = {StaticResource imageConverter}}" WidthRequest="30" HeightRequest="30" HorizontalOptions="Fill" VerticalOptions="Fill" />
</StackLayout>
</DataTemplate>
</ResourceDictionary>
|
|
public class ImageConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
double val = System.Convert.ToInt32(value);
if (val > 50)
return "up.png";
else
return "down.png";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
} |
Hi,
Perfect, thank you :) .
One last question - I am using 2 line series on a chart (value vs datetime range).
If I had a date range in set 1 from Sept-Oct and a date range in set 2 from Oct-Nov - is there anyway I can force the chart to use an x axis range from Sep - Not (i.e a combination of both date ranges?)
Cheers!
|
<chart:LineSeries.XAxis>
<chart:DateTimeAxis/>
</chart:LineSeries.XAxis> |