Docs / Line charts

Line with end labels

Pro

Labels each series at the end of its line instead of using a legend.

Illustration — rendered output uses live data.

Example

blade
<chart:line-labels
    :series="[
        ['name' => 'Solar', 'data' => [42, 50, 62, 80]],
        ['name' => 'Wind', 'data' => [30, 38, 41, 55]],
    ]"
    :categories="['2019', '2020', '2021', '2022']"
/>

Props

Prop Type Default Description
series array [] Series objects ([name, data]).
categories array [] Labels for the x-axis.
smooth bool false Render smooth lines.

Plus the common props (height, theme, model, class).

This is a Pro component

Unlock it and every other Pro chart with a one-time license.

Get WireCharts Pro