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 Articles
- 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
- Plotting data using highcharts piechart in flask web application
- How do I dynamically change a data point in Highcharts using JavaScript
- Scraping data from Highcharts using selenium
- 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?
- Formatting JSON data monthwise for HighCharts using MySQL
- How get data name in Highcharts pie chart legend instead of "Slice" using array of values?
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- How to hide one series data info in tooltip using highcharts
- Highcharts - Global configuration with common code and unique data & Headings
- Using Highcharts display donut hightchart having dynamic data
- Passing in Id for each data item in bar chart using highcharts
- Highcharts visualizes chart data incorrectly after zooming or using the navigator
- Click event and two way data binding in HighCharts using AngularJS
- Passing data to highcharts from javascript array or variable
- Highcharts smooth transition on data update using Angular and ng-highcharts
- Fetch data from firebase firestore and plot histogram using highcharts when cardview clicked - android
- How to Load More Than One CSV Using Highcharts Data Module
- How to hardcode chart data in my Model then have my Controller pull it from there to display it. Using Highcharts
- Meteor Highcharts using collection data
- highcharts example for using data from database with mvc
- Using HighCharts seriesMapping in data module to read a Total column
- Formatting data points and Y-axis labels using HighCharts
- Javascript: Plotting data from a variable using HighCharts- no data passing
- How to specify a range of data when using HighCharts with <table>?
- Using HIghcharts on Codeigniter to get data name and total
- Highcharts not working when pass the javascript variable as hightcharts series data
- Highcharts data label on last point of series not displayed
- Use ajax to draw graph dynamically using Highcharts
- How to display a Bar Chart in DataTable
- Highstock: When legend under the chart has many items, the chart height is small. How can I fix the height?
- jquery chart from data attr highcharts
- how to set the interval of points on Y - Axis highcharts
- Highcharts Bar Graphic: Make small number the higher bar and large number the smaller bar
- Javascript Highcharts: series datalabel formatter function to loop data not formatting all data form the array
- HighCharts - How can I split data labels in Sankey diagram?
- Highchart - line or area not starting at the left point
- Highcharts - set colour scheme option depending on number of series
- Sockets getting emitted , however data is not getting displayed in High charts Spline
- how to use Kendo chart library in Server side
- Tick position on X axis
- Pie chart slice radius using HighCharts library
- How to make buttons filter different data based on a category they select in Highcharts heatmap?
- High Charts - mouse over event on any part of graph
- how to display 24 hours in xAxis on Highcharts
- Can we create pie chart and scatter plot combined using highcharts.js?
- Highcharts milliseconds displaying incorrectly in xaxis