You are here

views-view-charts.html.twig in Charts 8

Same filename and directory in other branches
  1. 8.3 templates/views-view-charts.html.twig
{% 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
  1. {% if chart_type == 'google' %}
  2. {{ attach_library('charts_google/google') }}
  3. {{ attach_library('charts_google/charts_google') }}
  4. {% elseif chart_type == 'highcharts' %}
  5. {{ attach_library('charts_highcharts/highcharts') }}
  6. {{ attach_library('charts_highcharts/charts_highcharts') }}
  7. {% elseif chart_type == 'c3' %}
  8. {{ attach_library('charts_c3/d3') }}
  9. {{ attach_library('charts_c3/c3') }}
  10. {{ attach_library('charts_c3/charts_c3') }}
  11. {% else %}
  12. Unconfigured charts
  13. {% endif %}
  14. <div {{ attributes }} {{ content_attributes }} style="width:100%; height:400px;"></div>