{% extends "objects/view/regular_property.html" %}

{% block property_field %}
  {% if data is not none and 'plotly' in data and data.plotly != {} %}
    {% set plot_id = (id_prefix ~ '_plot') | get_hash  %}
    <div id="plotly_plot_div_{{ plot_id }}"></div>
    <script type="application/json" data-sampledb-plotly-chart="plotly_plot_div_{{ plot_id }}">
      {{ data.plotly | tojson | safe }}
    </script>
  {% else %}
    &mdash;
  {% endif %}
{% endblock %}
