Databricks has three types of line charts: Line and legacy charts Line (v2) and Line (v1).
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:
X-axis is categorical:
To migrate to Line from Line (v1) or Line (v2):
Click next to the bar chart and select Line.
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.