Chart Series: Point Customization

The 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.

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 following enum:

  • TKShapeTypeNone - No shape
  • TKShapeTypeSquare - Square shape
  • TKShapeTypeCircle - Circle shape
  • TKShapeTypeTriangleUp - Triangle pointing up
  • TKShapeTypeTriangleDown - Triangle pointing down
  • TKShapeTypeDiamond - Diamond shape
  • TKShapeTypeRhombus - Rhombus shape
  • TKShapeTypePentagon - Pentagon shape
  • TKShapeTypeHexagon - Hexagon shape
  • TKShapeTypeStar - Star shape
  • TKShapeTypeHeart - 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;