I am creating a RadCartesianChart which has a category of country name codes which I need to convert to a RegionInfo.DisplayName using a converter. I cannot figure out how to use a converter with CategoricalAxis?
<telerikChart:RadCartesianChart x:Name="Chart">
<telerikChart:RadCartesianChart.HorizontalAxis>
<telerikChart:NumericalAxis Location="Top"/>
</telerikChart:RadCartesianChart.HorizontalAxis>
<telerikChart:RadCartesianChart.VerticalAxis>
<telerikChart:CategoricalAxis PlotMode="OnTicks">
<telerikChart:CategoricalAxis>
<DataTemplate>
<Label Text="{Binding Converter={StaticResource countryNameConverter}" />
</DataTemplate>
</telerikChart:CategoricalAxis>
</telerikChart:CategoricalAxis>
</telerikChart:RadCartesianChart.VerticalAxis>
<telerikChart:RadCartesianChart.Series>
<telerikChart:SplineAreaSeries ItemsSource="{Binding Data}">
<telerikChart:SplineAreaSeries.ValueBinding>
<telerikChart:PropertyNameDataPointBinding PropertyName="Value"/>
</telerikChart:SplineAreaSeries.ValueBinding>
<telerikChart:SplineAreaSeries.CategoryBinding>
<telerikChart:PropertyNameDataPointBinding PropertyName="Category"/>
</telerikChart:SplineAreaSeries.CategoryBinding>
</telerikChart:SplineAreaSeries>
</telerikChart:RadCartesianChart.Series>
</telerikChart:RadCartesianChart>
I have a long label which is returned from Category, but the LabelFitMode Multiline in the below chart on the VerticalAxis does not result in the label wrapping to another line.
<
telerikChart:RadCartesianChart
x:Name
=
"OSVersion"
Palette
=
"{StaticResource BarGraphPalette}"
HeightRequest
=
"{Binding OsSummary.Progression, Mode=OneWay, Converter={StaticResource listToHeightConverter}, ConverterParameter=50}"
>
<
telerikChart:RadCartesianChart.Grid
>
<
telerikChart:CartesianChartGrid
MajorLinesVisibility
=
"None"
MajorLineColor
=
"Transparent"
/>
</
telerikChart:RadCartesianChart.Grid
>
<
telerikChart:RadCartesianChart.HorizontalAxis
>
<
telerikChart:NumericalAxis
ShowLabels
=
"True"
/>
</
telerikChart:RadCartesianChart.HorizontalAxis
>
<
telerikChart:RadCartesianChart.VerticalAxis
>
<
telerikChart:CategoricalAxis
GapLength
=
"0.3"
ShowLabels
=
"True"
LabelFitMode
=
"MultiLine"
PlotMode
=
"BetweenTicks"
/>
</
telerikChart:RadCartesianChart.VerticalAxis
>
<
telerikChart:RadCartesianChart.Series
>
<
telerikChart:BarSeries
ItemsSource
=
"{Binding OsSummary.Progression}"
ShowLabels
=
"True"
>
<
telerikChart:BarSeries.ValueBinding
>
<
telerikChart:PropertyNameDataPointBinding
PropertyName
=
"Value"
/>
</
telerikChart:BarSeries.ValueBinding
>
<
telerikChart:BarSeries.CategoryBinding
>
<
telerikChart:PropertyNameDataPointBinding
PropertyName
=
"Category"
/>
</
telerikChart:BarSeries.CategoryBinding
>
</
telerikChart:BarSeries
>
</
telerikChart:RadCartesianChart.Series
>
</
telerikChart:RadCartesianChart
>
Hi -
I have a list view that has "pull to refresh" enabled, and it works great -- refreshes and shows a spinner while it's refreshing.
There are other situations that cause me to refresh the data, though, and in a ViewModel, and I'd like to have a property that I can update in the view model that could be bound to the "IsRefreshing" so that I can see the same refresh spinner when I am programmatically refreshing the data in the list view.
I can use an a Xamarin "ActivityIndicator" to show a spinner, but then when we "pull to refresh" we see BOTH spinners, and it looks bad. This approach works fine for the programmatic-only refresh, but the pull becomes bad. If I remove the activity indicator, then I don't see anything when the programmatic refresh happens.
I see two options: Make it possible for me to set the "IsRefreshing" state for the ListView based on binding, or allow me to suppress the RadListView spinner in favor of the activity indicator - which would be seen then in both programmatic and pulls as the only indicator.
Let me know if I'm missing something or if this is possible.
I really appreciate the help and support.
Cheers -
Erik
Greetings
Can I request a full working example of a couple of custom editors (perhaps the email and password Inputs idea from the documentation site would be a good candidate) but specific to Xamarin.Forms iOS?
The documentation is a bit thin and I can't seem to figure out how the custom editor exposes it's value for the validation logic to pick it up.
Also I couldn't find anything on how to properly position the content of the custom editor to match the location in the middle of the screen with the text left aligned like the other built-in editors would normally do.
Thanks
Hi,
I'm developing a Xamarin application targeting Android and iOS and I'm having some issues when trying to change chart's legend text color.
My hunch is that is something related to the palette, but I couldn't figure out where the problem might be.
Here is part of my code:
//Create the Chart View
RadCartesianChartView chart =
new
RadCartesianChartView(
this
.Activity);
chart.Background =
new
global::Android.Graphics.Drawables.ColorDrawable(Color.White);
/* Add some behavior here */
/* Axes and so on */
var customPalette =
new
ChartPalette(chart.Palette);
PaletteEntry linesPalette = customPalette.GetEntry(ChartPalette.LineFamily, 0);
/* Apply my colors here */
chart.Palette = customPalette;
// As there are many series, I iterate through them in order to show them together
foreach
(ScatterPointSeries chartSeries
in
series)
{
chartSeries.XValueBinding = hvb;
chartSeries.YValueBinding = vvb;
chartSeries.CanApplyPalette =
false
;
chartSeries.StrokeThickness = 5.0f;
chartSeries.VerticalAxis = verticalAxis;
chartSeries.HorizontalAxis = horizontalAxis;
chart.Series.Add(chartSeries);
}
// Legengs
var legendView =
new
RadLegendView(
this
.Activity);
legendView.LegendProvider = chart;
var layoutParams =
new
LinearLayout.LayoutParams(LinearLayout.LayoutParams.WrapContent, GetLegendsHeight(series.Length));
layoutParams.SetMargins(5, 5, 5, 5);
legendView.LayoutParameters = layoutParams;
// And finally I add both views to the layout
linearLayout.AddView(legendView);
linearLayout.AddView(chart);
As you can see in the attached screenshot, legend text is grayed out. I'm expecting to see the text color black.
Am I missing something?
Many thanks in advance!
Hello guys,
Is there any solution for multi-line textbox for Xamarin forms ? If yes then please let me know how to implement it ?
Thank you.
I have a RadListView with uneven row heights that I need to place inside a ScrollView in Xamarin Forms. Due to scrolling issues (on Android) I need to set the overall height of the RadListView to show all the rows.
How can I calculate the total height of all rows when they are dynamically sized according to their content?
Hi,
I have copied following code to display gauge on my content page (XAML) but getting below exception when it renders. Can anyone please help me out?
System.ArgumentException: Object of type 'Telerik.XamarinForms.DataVisualization.Gauges.GaugeRangesDefinition' cannot be converted to type 'Xamarin.Forms.View'.
Here is my code:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:gauges="clr-namespace:Telerik.XamarinForms.DataVisualization.Gauges;assembly=Telerik.XamarinForms.DataVisualization"
xmlns:common="clr-namespace:Telerik.XamarinForms.Common;assembly=Telerik.XamarinForms.Common"
x:Class="Test.Portable.Cases.CaseManagement">
<Grid Grid.ColumnSpacing="0" Grid.RowSpacing="0" BackgroundColor="#F7F7F7">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<gauges:GaugeRangesDefinition>
<gauges:GaugeRange From="0" To="100" Color="Green" />
<gauges:GaugeRange From="100" To="150" Color="Yellow" />
<gauges:GaugeGradientRange From="150" To="200">
<common:RadGradientStop Color="Red" Offset="150" />
<common:RadGradientStop Color="Black" Offset="200" />
</gauges:GaugeGradientRange>
</gauges:GaugeRangesDefinition>
</Grid>
</ContentPage>
Thanks,
Kumar