Position X-axis on zero-value

Type tutorial

Normally, the X-axis will be shown at the bottom of the plot container, regardless of the Y-axis scale. This tutorial shows how we can make the X-axis dynamically position itself so that it sticks to the position of the zero value. Code The idea is to watch for various events that could affect position of […]

Aligning a legend with plot container

Type tutorial

This demo shows how we can use axis’ events to monitor its width, and automatically adjust position of the legend, so it is aligned perfectly with the plot area. Code Demo

Axis zoom end event

Type tutorial

This demo shows how we can use value change events of the start and end axis settings, as well as use debouncing techniques on the handlers to detect when the zoom animation has finished. Code Demo

Solving overlapping bullets

Type tutorial

This short tutorial shows a couple of ways to solve the situations where multiple series can have label bullets shown, and thus may overlap with each other. Repositioning with an adapter We can use an adapter, to dynamically check for overlap with other bullets, and change bullet’s centerY setting, so it is either moved down […]

Dynamically changing legend position

Type tutorial

This short tutorial will show the steps involved in dynamically changing position of the legend. Changing position The following steps are involved when changing the position of the legend, e.g. from bottom to left: For example, the below code will move the legend from bottom, to left: Demo

Grouping legend items

Type tutorial

This short tutorial will introduce two approaches that can be used to group legend items by inserting a label between its items. Approach #1 The easiest approach is to create a legend like we would do on any chart, set its data, then insert Label elements at predefined places in legend’s children list. The downside […]

Bullet following cursor

Type tutorial

This demo shows how we can show a bullet on the hovered data item without creating bullets for each data item. This results in a better performance.