New to Telerik UI for Xamarin? Download free 30-day trial

Chart for Xamarin.iOS: Series Points Customization

TKChartSeries can draw a point in particular shape. You can customize the appearance and shape of this point by accessing and altering the styling properties and palette items for ShapePallete style property.

Note that the approach above is applicable to any series except TKChartPieSeries, TKChartBarSeries and TKChartColumnSeries. If you want to change the shape of each point, you should use the following code snippet:

series.Style.PointShape = new TKPredefinedShape (TKShapeType.Circle, new SizeF (10, 10));

You can specify many predefined shapes by using the TKShapeType enum. The available options are listed below:

  • TKShapeType.None - No shape
  • TKShapeType.Square - Square shape
  • TKShapeType.Circle - Circle shape
  • TKShapeType.TriangleUp - Triangle pointing up
  • TKShapeType.TriangleDown - Triangle pointing down
  • TKShapeType.Diamond - Diamond shape
  • TKShapeType.Rhombus - Rhombus shape
  • TKShapeType.Pentagon - Pentagon shape
  • TKShapeType.Hexagon - Hexagon shape
  • TKShapeType.Star - Star shape
  • TKShapeType.Heart - Heart shape

In addition, you can change a point background color by using the following lines of code:

var paletteItem = new TKChartPaletteItem ();
paletteItem.Fill = new TKSolidFill (UIColor.Red);
var palette = new TKChartPalette ();
palette.AddPaletteItem (paletteItem);
series.Style.ShapePalette = palette;

In this article