The rendering of all marks can be customized if the default doesn't conform to your need. Charts.kt provides different ways of customizing the rendering depending on the level of customization you want.

In this guide you'll see how to:

Find a similar Javascript example code here: https://play.data2viz.io/sketches/wYwzBL/edit/

Example of a mark decorator

You have a chart and want to highlight values that have a specific "status". You also want to use a custom "selector" in the form of a small red triangle, and add a custom label when a value is critical.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2db4f2d7-a6bf-4c6f-810c-edad53053b0c/Untitled.png

Let's see what you need to do to create this.

Mark styles

Most standard marks have default styles that can be overriden.

Simple property

When you look at Charts-kt reference, you can see that some styles are straightforward, for example, the curve value of a LineMark is a simple property that defines how to draw the line: straight, curved...

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/da1decc8-1feb-4f5a-a17a-5985dc7a9153/Untitled.png

See reference documentation