3 Answers, 1 is accepted
0
Hi Ruben,
We have a demo in the iOS Samples application that shows how to create custom point labels. I believe with the proper modifications it will fit your requirement. Please have a look at it, you can find it in your local Telerik UI for Xamarin installation. Simply navigate to the Examples/iOS folder and have a look at the Chart/PointLabels/CustomPointLabel implementation once you have opened the solution.
Regards,
Stefan Nenchev
Progress Telerik
We have a demo in the iOS Samples application that shows how to create custom point labels. I believe with the proper modifications it will fit your requirement. Please have a look at it, you can find it in your local Telerik UI for Xamarin installation. Simply navigate to the Examples/iOS folder and have a look at the Chart/PointLabels/CustomPointLabel implementation once you have opened the solution.
Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ruben
Top achievements
Rank 1
answered on 06 Sep 2017, 12:55 PM
Thanks for the reply. However, my question is about points themselves, not point labels. I already figured out how to have different colors for points on a single series but now can't find a way to do the same for point shapes? Can I have points of different shapes on a single series?
0
Hello Ruben,
You can change the color of the points as well by overriding the PaletteItemForPoint(shown in the demo - CustomPointLabels.cs):
You can return different palette item according to your custom logic.
Unfortunately, it would not be possible to assign different shapes for the points of the same series.
Have a great weekend.
Regards,
Stefan Nenchev
Progress Telerik
You can change the color of the points as well by overriding the PaletteItemForPoint(shown in the demo - CustomPointLabels.cs):
public
override
TKChartPaletteItem PaletteItemForPoint (TKChart chart, nuint index, TKChartSeries series)
{
if
(series.Index == (nuint)
this
.selectedSeriesIndex && index == (nuint)
this
.selectedDataPointIndex) {
return
new
TKChartPaletteItem (
new
TKStroke (UIColor.Black, 2.0f),
new
TKSolidFill (UIColor.White));
}
if
(series.Index == 0) {
return
new
TKChartPaletteItem (
new
TKSolidFill (
new
UIColor ((
float
)(108 / 255.0), (
float
)(181 / 255.0), (
float
)(250 / 255.0), (
float
)1.0)));
}
return
new
TKChartPaletteItem (
new
TKSolidFill(UIColor.Green));
}
Unfortunately, it would not be possible to assign different shapes for the points of the same series.
Have a great weekend.
Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items