Hi,
We had many similar problems with the gizmo. The solution that worked for us was stop using the gizmo, and instead use Highcharts directly:
1) In templates/home.html add <div id="ts-chart" class="highcharts-plot"></div> in the place where we want to show the chart
2) In templates/home.html under {% block scripts %} add <script src="/static/tethys_gizmos/vendor/highcharts/js/highcharts.js"></script>
3) In public/js/main.js add the configuration of the chart, for example:
var chart_options = {
plotOptions: {
line: {
color: Highcharts.getOptions().colors[0],
marker: {
radius: 2
},
size:'100%',
lineWidth: 1,
states: {
hover: {
lineWidth: 1
}
},
threshold: null
}
}
};
// this command will initialize the chart
$(document).ready(function () {
$('#ts-chart').highcharts(chart_options);
})
For adding data to the chart we make a new controller (for example chart_data) that returns the data array in json format,
and then in main.js we can use a command like
$('#ts-chart').highcharts().addSeries(data)