score:2
Accepted answer
Jinja2 escapes all variables as a safety measure. The array of dictionaries you show is rendered by default as:
[{'f_name': 'Bruce Gradkowski', 'team': 'PIT', 'number': 5, 'position': 'QB', 'y': 99.79, 'x': 185.42}, {'f_name': 'Matthew Stafford', 'team': 'DET', 'number': 9, 'position': 'QB', 'y': 105.23, 'x': 190.5}]
Note how the quotes were converted into HTML entities.
To prevent escaping you can add the safe
filter as follows:
{{ var_name|safe }}
Note that this only works because Javascript and Python happen to have a similar syntax for arrays and dictionaries.
Source: stackoverflow.com
Related Query
- Using a flask variable as data source for highcharts
- Highcharts display label for pie chart using html table as data source
- HTML table as data source for highstock charts using highcharts
- Formatting JSON data monthwise for HighCharts using MySQL
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Passing in Id for each data item in bar chart using highcharts
- highcharts example for using data from database with mvc
- Two way data binding in Angular JS for graphs implemented using HighCharts
- Data and tooltip not working for graph using highcharts
- Highcharts to populate data for pie chart using json object
- Error: Data source must be a URL for refresh | console error | javascript | Highcharts
- Use Node.js as data source for highcharts
- How to display real time data using highcharts for Angular application?
- Using highcharts for Rails (via LazyHighCharts), is there a tooltip for yDateFormat for having datetime data on the Yaxis?
- In highCharts so much space left for each category when using index with data
- Plotting data using highcharts piechart in flask web application
- manipulating data for Highcharts graph using javascript
- Using an array for data in highcharts
- How to make highcharts default to 0 for missing data
- Changing data dynamically for a series in Highcharts
- Add additional data to a Highcharts series for use in formatters
- How do I dynamically change a data point in Highcharts using JavaScript
- Improve highcharts performance for large amounts of data
- Highcharts not displaying data labels for Pie chart in arabic
- Scraping data from Highcharts using selenium
- Use an array of objects for series data in Highcharts
- Using Highcharts and displaying a message over or on the chart when there is no data
- Highcharts how to use JavaScript variable as series data source?
- create a sticky tooltip for a point or a permanent label using HighCharts
- Highcharts - Provide URL's for series data to open clickable link
More Query from same tag
- How to customise step line chart in Highchart?
- Highchart heatmap plot x-axis on time and y-axis on string
- How to call Objective-C function from javascript in iOS
- Highmaps Select Multiple Points With Clustering Enabled Loses What Is Selected Already
- Highmaps limit zoom range breaks zooming out
- Custom Notation in HighChart series
- How to Create synchronized High chart with different no of series per chart
- highchart chart redraw method is not refreshing the chart
- Highcharts - stop Y axis value change on redraw
- Highcharts: Is it possible to display series with the same name in different columns?
- a.getLabelConfig is not a function
- Draw pie chart using spring boot, thymeleaf, js, highchart but can't
- Saving dynamically added divs containing charts
- Adding marker points for highcharts map
- Highcharts Column with php
- How to drilldown to third level when its data is determined by second's click event?
- Change the zoom Type dynamically?
- How to change colors options in Highcharts programmatically?
- Highcharts markers to appear only on x axis ticks
- ReferenceError: Highcharts is not defined while including html file (with JS and CSS ) into other html file
- Highcharts dynamically change bar color based on value
- How to set values in JavaScript (Highcharts) using PHP
- highchart mysql json issue
- JavaScript error when using Highcharts
- High chart is not getting populated
- Prevent Nil Values in Transformed Array
- Different data with same series name
- Get data from several series Highcharts
- Javascript set theme for each graph
- csv with dates in decimal format