Comments (6)
Good idea. 👍 we will have this in the next release.
from django-graphos.
PR #15 resolves this issue. It retains {{ chart.as_html }} to render both and add {{ chart.render_html }}, {{ chart.render_js }} to render html and js only. We can update demo_project with new tags after merging this PR.
from django-graphos.
This PR is ready, just not merged. I hope someone can merge it because I'm eager to use this feature.
from django-graphos.
@8ksoft @tkwon The PR for this is merged into master. Can you check if this is what you wanted. Please feel free to reopen this issue if you think it's not fixed.
from django-graphos.
@8ksoft @tkwon After merging PR for suggested changes, now the following can be done in the template:
{% block comment %}
Javascript section
{% endcomment %}
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
</script>
{{chart.render_js}}
{% block comment %}
Html section
{% endcomment %}
{{chart.render_html}}
This assumes that view has following code:
sd = SimpleDataSource(data)
chart = gchart.LineChart(sd)
context = {'chart': chart}
return render(request, 'some_template.html', context)
from django-graphos.
Great!
from django-graphos.
Related Issues (20)
- Morris Donut not supporting colors option?
- Demo page gives 500 error
- Dygraphs support
- Chart does not load when table update instead of page refresh
- Related WebPage may have Typo
- highchart tooltip useHTML does not work
- Issue with GoogleCharts and counting unique values HOT 1
- Setting Chart size to width of page? HOT 1
- Display chart inside javascript
- Add ability to pass links in gcharts
- C3.js renderer lacks support for area charts and stacking
- Demo page yields "404" error HOT 4
- maximum recursion depth exceeded on LineChart
- Issue on annotation?
- Docs and demo are down HOT 2
- This doesn't appear to work anymore with Google HOT 2
- Is this project still maintained?? HOT 1
- This project needs a maintainer.
- Bug in documentation HOT 1
- Documentation Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-graphos.