score:1
Accepted answer
One of the reasons it is not working is that you had not added the code in an anonymous function. Other was that you had added document.ready
code in for loop of non document.ready
codes. This makes the code skip the execution until document is ready.
<script type='text/javascript'>
$(document).ready(function () {
function createElem() {
for(v=1;v<{{ uniindicatorproduct|safe }}+1;v++) {
var container = "#container"+v;
var title = { text: '{{ title|safe }}' };
var xAxis = {categories: {{ t|safe }}, };
var yAxis = {title: {text: ' '}, };
var array ={{ y|safe }}
var series = [],
i = 0;
var a = {{ x|safe }}
lena = a.length
for (i; i < lena; i++) {
series.push({
name: [a[i]],
data: array[i]
});
}
var json = {};
.....
$(container).highcharts(json);
}
}
//Call the above function once html is ready
createElem();
});
</script>
Source: stackoverflow.com
Related Query
- How to create multiple highchart and print in HTML page by using for loop?
- How to create a drilleable bar graph in jsp page using open source charts API
- Highchart Callback Refactoring not working, and how to display multiple series using multiple Ajax data
- How to create a column range chart in Highcharts using range and navigator functions?
- How to create a new Highstock chart with new Highchart and not jquery?
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts - how to create multiple y axis and group the data series
- How to use Highcharts React to create chart with multiple lines for same XAxis?
- How to read and insert correct highchart number in selectors using Selenium Webdriver with Python?
- How can I put the Highchart to the html page
- Setting Min and Max values for more than two Highchart Solid Gauges using function
- How to fetch JSON data from HTML DIV on same page for Highcharts?
- How to draw multiple highcharts using highcharts-ng and angularjs
- How could you supply multiple series to a line chart in R shiny using highcharter package and without hardcoding the series?
- Highchart - Custom Images for Labels by using html
- Highcharts display label for pie chart using html table as data source
- How to use jspdf to print and download the multiple highcharts contents in pdf format
- How to create doughnut highchart using angular JS
- How to create 2 axis and 2 yaxis in highchart
- how to auto create pdf using highchart graphs
- How do I create a columnrange highchart with a point object (consisting of one x and two y values)?
- how to render multiple line charts - highcharts on same page using highcharts react wrapper - highcharts-react-offical
- How to add a vertical plot line in multiple line series and show the tooltip on Plot line in highchart
- Ugly Highchart when using letter label for both xaxis and yaxis
- How to change the data series for highchart using a dropdown list
- HTML table as data source for highstock charts using highcharts
- How to get data from multiple tables of MySQL DB and manuplate it using PHP to display graphs?
- Highcharts - how to display multiple graphs on one page using multiple xml files
- How can I prepare a Group Stacked Bar Chart in Highcharts using multiple and different types of data?
- How to plot multiple lines in a single graph using HighChart with JSON
More Query from same tag
- web interface using jQuery for Java application
- Highcharts sunburst dodrilldown
- Combine PieChart with Map
- same scale on x y axis in highchart
- Highcharts scatter marker translation error
- How to use image on label depending on data?
- Highcharts plotOptions.area.depth does not exist in latest version
- Highcharts - How to get Max and Min value between 2 dates
- Problem in plotting a map graph using highcharter
- Highcharts markers on legend and hover ONLY
- How to add data labels for a treemap in highcharter in r?
- Show customized Mouse over on a bubble chart in Highchart JS
- highcharts: disable only a single element in legend so it cannot be clicked
- Highcharts pie on legenditemclick avoid slicing of pie but show animation on legend item
- How to stop resetting zoom when switches to other chart type in highcharts
- Highchart Combochart Rendered Wrong
- How to sort order highchart pie jasperstudio by slice value min to max
- Highcharts : synchronized charts, It's possible export download image all in one?
- Highcharts. Place tooltip on top of all items
- When using Highcharts, how do you get the point name from a data point series?
- Comparing percentage with Highstock
- dynamic plotbands in Highcharts
- How to do a data overlap independently column in Highcharts
- Highcharts columns - fixed border width, remove spacing between the bars
- No auto resize of yaxis of highcharts in shiny
- Highcharts javascript library - marker halo zIndex?
- Highcharts Heatmap - How to get blocks next to each other when separated by more then '1' in value
- Highcharts - hide legend if there is no value
- Highcharts: Updating a Pie Chart with setData()
- How to enable/disable sections in Pie chart in Highcharts