{% assign data = charts[include.chart-id] %} {% assign id = include.id | default: include.chart-id %} {% assign height = include.height | default: data.height | default: 10 %} {% assign class = include.class %} {% if include['size'] == 'sm' %} {% assign class = class | append: ' chart-sm' | strip %} {% assign height = 2.5 %} {% elsif include['size'] == 'lg' %} {% assign class = class | append: ' chart-lg' | strip %} {% assign height = 15 %} {% endif %} {% if data %} {% if data.extend %} {% assign data = charts[data.extend] | concat_objects: charts[include.chart-id] %} {% endif %}
{% capture script %} {% assign chart-type = data.type | default: 'bar' %} {% endcapture %} {{ script }} {% endif %}