Hello,
I am currently implementing the ScatterLineSeries for a RadCartesianChartView.
What I am unable to get working is the Major and Minor Step lines for the graph.
Any input would be helpful, thank you.
private void createChart()
{
scatterPointSeries.StrokeColor = Color.Green;
scatterPointSeries.XValueBinding = new XValueBinding();
scatterPointSeries.YValueBinding = new YValueBinding();
LinearAxis verticalAxis = new LinearAxis();
verticalAxis.LabelValueToStringConverter = new YLabelValueConverter();
verticalAxis.Maximum = 4;
verticalAxis.Minimum = 0;
LinearAxis horizontalAxis = new LinearAxis();
horizontalAxis.LabelValueToStringConverter = new XLabelValueConverter();
horizontalAxis.Maximum = 24;
horizontalAxis.Minimum = 0;
horizontalAxis.MajorStep = 1;
scatterPointSeries.VerticalAxis = verticalAxis;
scatterPointSeries.HorizontalAxis = horizontalAxis;
//Bind series to data
scatterPointSeries.Data = this.getData();
//Add series to chart
chart.Series.Add(scatterPointSeries);
CartesianChartGrid grid = new CartesianChartGrid();
grid.MajorYLinesRenderMode = GridLineRenderMode.All;
grid.LineThickness = 1;
grid.LineColor = Color.Black;
grid.MajorLinesVisibility = GridLineVisibility.Y;
chart.Grid = grid;
}
Hello,
We have used the Kendo version of the chart view to create a scatter line graph with both minor and major lines.
What I am noticing is that there seems to be no support for minor steps for the Xamarin android chart.
If anybody could please advise how to add minor steps or a usable workaround.
Hello,
Is there any way to change position of data points (numbers) on Xamarin Forms UWP/Windows Pie Chart, currently they render out side of Pie Chart, and get clipped.
Thanks,
Ram prasad
This really needs to be improved.
The sample for BarSeries and others is just code behind...seriously who uses the controls like that???
The samples are slapped together with little love, they are supposed to showcase the product!
Hi, is it possible to have different colors for each bar in a single series. If possible, can i get an example of how i can do that. The docs kinda show how to do that for two different series from the way i understand.
Thanks
I am trying to implement the chart with DateTime axis in microsecond interval. Also, while trying to add the date with day intervals, all data are overlapped.Could you please resolve this?
Looks like a bug to me in version 2017.1.1220.233...
The Issue
Here is my model, I have a collection of these;
public
class
Site
{
public
int
SiteId {
get
;
set
; }
public
string
SiteName {
get
;
set
; }
public
string
SiteDetailText {
get
;
set
; }
public
string
FarmName {
get
;
set
; }
}
Here is the XAML definition of the RadListView;
<
telerikui:RadListView
x:Name
=
"SitesList"
ItemsSource
=
"{Binding MySites}"
>
<
telerikui:RadListView.ItemTemplate
>
<
DataTemplate
>
<
listView:ListViewTemplateCell
>
<
listView:ListViewTemplateCell.View
>
<
Grid
Padding
=
"5"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
Label
Grid.Row
=
"0"
Text
=
"{Binding SiteName}"
FontSize
=
"Large"
/>
<
Label
Grid.Row
=
"1"
Text
=
"{Binding SiteDetailText}"
/>
</
Grid
>
</
listView:ListViewTemplateCell.View
>
</
listView:ListViewTemplateCell
>
</
DataTemplate
>
</
telerikui:RadListView.ItemTemplate
>
<!-- this doesn't work -->
<
telerikui:RadListView.GroupDescriptors
>
<
listView:PropertyGroupDescriptor
PropertyName
=
"FarmName"
/>
</
telerikui:RadListView.GroupDescriptors
>
</
telerikui:RadListView
>
I get the collection of Site models from a JSON string, and sometimes the FarmName property is missing, meaning FarmName is null. When I run the application this exception is thrown;
03-23 12:08:52.176 I/MonoDroid( 4852): UNHANDLED EXCEPTION:
03-23 12:08:52.180 I/MonoDroid( 4852): System.ArgumentException: The default comparer works with elements that implement IComparable interface.
03-23 12:08:52.180 I/MonoDroid( 4852): at (wrapper managed-to-native) Java.Interop.NativeMethods:java_interop_jnienv_call_nonvirtual_void_method_a (intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*)
03-23 12:08:52.180 I/MonoDroid( 4852): at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0008f] in /Users/builder/data/lanes/4009/9578cdcd/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12079
03-23 12:08:52.180 I/MonoDroid( 4852): at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (System.IntPtr jobject, System.IntPtr jclass, System.IntPtr jmethod, Android.Runtime.JValue* parms) [0x00000] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/JNIEnv.g.cs:444
03-23 12:08:52.180 I/MonoDroid( 4852): at Com.Telerik.Widget.List.ListViewAdapter.set_Items (System.Collections.IList value) [0x0009d] in <4ab376ccf3e94543ba940e1beffd5307>:0
03-23 12:08:52.180 I/MonoDroid( 4852): at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewDataSourceAdapterExtensions.SetSource (Com.Telerik.Widget.List.ListViewDataSourceAdapter adapter, System.Collections.IEnumerable source) [0x00007] in <0283f7990ca1485d8a9efc5b1581ce6f>:0
03-23 12:08:52.180 I/MonoDroid( 4852): at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewAdapter.UpdateItemsSource (Telerik.XamarinForms.DataControls.RadListView sourceOwner, Com.Telerik.Widget.List.RadListView targetOwner) [0x00011] in <0283f7990ca1485d8a9efc5b1581ce6f>:0
03-23 12:08:52.180 I/MonoDroid( 4852): at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewAdapter.UpdateCore (Telerik.XamarinForms.DataControls.RadListView sourceOwner, Com.Telerik.Widget.List.RadListView targetOwner, System.String propertyName) [0x0004b] in <0283f7990ca1485d8a9efc5b1581ce6f>:0
03-23 12:08:52.180 I/MonoDroid( 4852): at Telerik.XamarinForms.Common.FacadeAdapterBase`2[S,T].Update (System.Object sourceOwner, System.Object targetOwner, System.String propertyName, System.Object sourceOwnerRoot, System.Object targetOwnerRoot) [0x00000] in <41a54de86ddf4ac5b8f46f7114ddd5ec>:0
03-23 12:08:52.180 I/MonoDroid( 4852): at Telerik.XamarinForms.Common.XamarinToNativeControlExtensions.Update[T,K] (T nativeElement, K xfЕlement, System.String propertyName, System.Object sourceOwnerRoot, System.Object targetOwnerRoot) [0x0002b] in <41a54de86ddf4ac5b8f46f7114ddd5ec>:0
03-23 12:08:52.180 I/MonoDroid( 4852): at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00023] in <0283f7990ca1485d8a9efc5b1581ce6f>:0
03-23 12:08:52.180 I/MonoDroid( 4852): at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
03-23 12:08:52.180 I/MonoDroid( 4852): at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:137
03-23 12:08:52.180 I/MonoDroid( 4852): at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:379
03-23 12:08:52.180 I/MonoDroid( 4852): at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.BindableObject+SetValueFlags attributes, System.Boolean silent) [0x000f4] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:581
03-23 12:08:52.180 I/MonoDroid( 4852): at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.BindableObject+SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0014b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:378
03-23 12:08:52.180 I/MonoDroid( 4852): at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:173
03-23 12:08:52.180 I/MonoDroid( 4852): at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:55
03-23 12:08:52.180 I/MonoDroid( 4852): at Xamarin.Forms.BindingExpression+BindingExpressionPart.<PropertyChanged>b__47_0 () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:542
03-23 12:08:52.180 I/MonoDroid( 4852): at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/4009/9578cdcd/source/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36
03-23 12:08:52.180 I/MonoDroid( 4852): at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Java.Lang.IRunnable.cs:81
03-23 12:08:52.180 I/MonoDroid( 4852): at (wrapper dynamic-method) System.Object:7de252d4-c417-4d4a-8229-509ea6b9512e (intptr,intptr)
The Fix
If I remove the <RadListView.GroupDescriptors> from the XAML this works fine...
Also, It works without crashing if I change the definition of the FarmName property to have a default value;
public
string
FarmName {
get
;
set
; } =
"No Farm"
Can we please have it so the List can handle these null values gracefully (empty string maybe)? Either that or show a clearer error message. I've spent 4 hours trying to get this grouping working, and until I stumbled across the stack trace for the IComparer exception I was struggling to figure out where to start.
Cheers
Having a compilation error that is only occurring on the Android side.
Error Attribute "showTitle" has already been defined
File in question: \obj\Debug\__library_projects__\Telerik.Xamarin.Android.Input\library_project_imports\res\values\attrs.xml
Unfortunately this could have been caused by numerous different things, it started happening with the recent Xamarin update (4.3.0.795), but I was also forced to update the project target to Android 7.0.
Interestingly enough, if I manually edit the file and remove <attr name="showTitle" format="boolean" /> then the project will build successfully. If I rebuild the project however, the attribute reappears and the build fails.
Below is the content of the Attrs.xml file:
<
resources
><
declare-styleable
name
=
"CalendarCellState"
><
attr
name
=
"state_calendar_cell_today"
format
=
"boolean"
/></
declare-styleable
><
declare-styleable
name
=
"RadCalendarView"
><
attr
name
=
"calendarBackground"
format
=
"color"
/><
attr
name
=
"showTitle"
format
=
"boolean"
/><
attr
name
=
"showDayNames"
format
=
"boolean"
/><
attr
name
=
"showGridLines"
format
=
"boolean"
/><
attr
name
=
"showCellDecorations"
format
=
"boolean"
/><
attr
name
=
"selectionMode"
format
=
"enum"
><
enum
name
=
"Single"
value
=
"0"
/><
enum
name
=
"Range"
value
=
"1"
/><
enum
name
=
"Multiple"
value
=
"2"
/></
attr
><
attr
name
=
"displayMode"
format
=
"enum"
><
enum
name
=
"Month"
value
=
"0"
/><
enum
name
=
"Year"
value
=
"1"
/><
enum
name
=
"Week"
value
=
"2"
/></
attr
><
attr
name
=
"weekNumberDisplayMode"
format
=
"enum"
><
enum
name
=
"None"
value
=
"0"
/><
enum
name
=
"Inline"
value
=
"1"
/><
enum
name
=
"Block"
value
=
"2"
/></
attr
><
attr
name
=
"isYearModeCompact"
format
=
"boolean"
/></
declare-styleable
><
declare-styleable
name
=
"CalendarTheme"
><
attr
name
=
"calendarStyle"
format
=
"reference"
/></
declare-styleable
></
resources
>
When I trying to add Telerik DLLs getting this error APT0000:Attribute "showTitle" has already been defined
I'm using xamarin forms 2.3.4.224
and xamarin android support libraries 25.1.0.
I can't added support libraries 23.3.0..because of I'm using Firebase DLL s its dependencies and xamarin android support libraries should be 25.1.0
What is the solution?