.. include:: ../../../Includes.txt
.. _includingChartsInHtmlTemplates:
==================================
Including Charts in HTML Templates
==================================
SAV Charts viewHelpers can be used in any
HTML template processed by Fluid.
The following example illustrates how to
integrate a bar chart that displays
the number of pages created per year
(see :ref:`usingAndDevelopingQueryManagers`).
.. code-block:: html
{namespace c=YolfTypo3\SavCharts\ViewHelpers}
Analysis of the site
Pages per year
EXT:sav_charts/Resources/Private/Templates/ChartsExamples/FluidParser/BarChartAdvanced.fluid
.. note::
The Fluid variable `charts` contains information
on the created charts, starting from 0. Therefore,
`charts.0.chartId` is the ID of the first chart
in :guilabel:`EXT:sav_charts/Resources/Private/Templates/ChartsExamples/FluidParser/BarChartAdvanced.fluid`.
.. figure:: ../../../Images/Tutorial/BarChartInHtmlTemplate.png
:width: 60%