views-view-charts.html.twig in Charts 8
{% if chart_type == 'google' %}
{{ attach_library('charts_google/google') }}
{{ attach_library('charts_google/charts_google') }}
{% elseif chart_type == 'highcharts' %}
{{ attach_library('charts_highcharts/highcharts') }}
{{ attach_library('charts_highcharts/charts_highcharts') }}
{% elseif chart_type == 'c3' %}
{{ attach_library('charts_c3/d3') }}
{{ attach_library('charts_c3/c3') }}
{{ attach_library('charts_c3/charts_c3') }}
{% else %}
Unconfigured charts
{% endif %}
<div {{ attributes }} {{ content_attributes }} style="width:100%; height:400px;"></div>
File
templates/views-view-charts.html.twig
View source
- {% if chart_type == 'google' %}
- {{ attach_library('charts_google/google') }}
- {{ attach_library('charts_google/charts_google') }}
- {% elseif chart_type == 'highcharts' %}
- {{ attach_library('charts_highcharts/highcharts') }}
- {{ attach_library('charts_highcharts/charts_highcharts') }}
- {% elseif chart_type == 'c3' %}
- {{ attach_library('charts_c3/d3') }}
- {{ attach_library('charts_c3/c3') }}
- {{ attach_library('charts_c3/charts_c3') }}
- {% else %}
- Unconfigured charts
- {% endif %}
- <div {{ attributes }} {{ content_attributes }} style="width:100%; height:400px;"></div>