---
title: "Line ViewHelper <c:plotlychart.line>"
manual: "SAV Charts"
version: "main"
permalink: "https://docs.typo3.org/permalink/yolftypo3/sav-charts:plotlychart-lineviewhelper@main"
source: "Reference/FluidParserViewHelpers/PlotlyChart/LineViewHelper/Index.rst"
rendered: "2026-10-09T13:07:41+00:00"
---

# Line ViewHelper \<c:plotlychart.line> {#plotlychart-lineviewhelper}

ViewHelper to include a line chart with `Plotly`.

Go to the source code of this ViewHelper:
[LineViewHelper.php](https://github.com/YolfTypo3/SavCharts/blob/main/Classes/ViewHelpers/PlotlyChart/LineViewHelper.php) (GitHub).

## Quick Test {#quick-test}

```xml
<c:template id="1">
EXT:sav_charts/Resources/Private/Templates/PlotlyChartsExamples/LineChart.fluid"
</c:template>
```

![](../../../../Images/ScreenShots/PlotlyCharts/lineChart.png)

## Arguments {#arguments}

-   **id**

    -   *Required:* true
    -   *Type:* string

    Chart ID

-   **data**

    -   *Required:* true
    -   *Type:* mixed

    Data, or a reference to data

-   **layout**

    -   *Type:* mixed

    Layout, or a reference to layout

-   **config**

    -   *Type:* mixed

    Config, or a reference to config

-   **width**

    -   *Type:* string
    -   *Default:* 600

    Width value, or a reference to the width value

-   **height**

    -   *Type:* string
    -   *Default:* 400

    Height value, or a reference to the height value

## Examples {#examples}

### Defining a Line Chart {#defining-a-line-chart}

```xml
<c:plotlycharts>
    <c:plotlychart.line id="1" data="data__lineChartData" layout="data__lineChartLayout" >
        ...
    </c:plotlychart.line>
</c:plotlycharts>
```
