Legacy line charts

Databricks has three types of line charts: Line and legacy charts Line (v2) and Line (v1).

Line chart comparison

Line has custom plot options: setting a Y-axis range, showing or hiding markers, and applying log scale to the Y-axis and a built-in toolbar that supports a rich set of client-side interactions.

In addition, Line, Line (v2), and Line (v1) charts treat time-series data in different ways:

Line and Line (v2) Line (v1)

Date and timestamp are supported.

Line (v2) formats a date to local time.

Date and timestamp are treated as text.
Key can only be date, timestamp, or number. Key can be of any type.

X-axis is ordered:

  • Natural, linear ordering of date, timestamp, and number.
  • Gaps in time appear as gaps on the chart.

X-axis is categorical:

  • Not ordered unless the data is ordered.
  • Gaps in time do not appear on the chart.

Migrate to Line from legacy line chart types

To migrate to Line from Line (v1) or Line (v2):

  1. Click Button Down next to the bar chart Chart Button and select Line.

    Chart types
  2. For a Line (v1) chart, if the key column is not a date, timestamp, or number, you must parse the column to a date, timestamp, or number explicitly as demonstrated in the following notebook.

Timestamp conversion notebook

Use legacy line charts

To use legacy line charts, select them from the Legacy Charts drop-down menu.

Legacy chart types