Comments (5)
If you look at the code, you'll notice the output:
graphs::output(graphs::Output::GOOGLE);
It outputs graphs in HTML format using the Google Graph API. By calling the function of graphs.hpp, the results are stored and then output when graphs::output is used.
Normally that should be enough.
from articles.
Thanks. I've never used that API. After some poking around, I found I had to add the following around the contents of graph.html (diff below). Am I missing something or is there an automatic way to go from graph.html to a viewable html page?
$ diff graph.html my_graphs.html
1c1,9
< <script type="text/javascript">
---
> <html>
> <head>
> <!--Load the AJAX API-->
>
>
> <script type="text/javascript" src="https://www.google.com/jsapi"></script><script type="text/javascript">
> google.load('visualization', '1.0', {'packages':['corechart']});
> google.setOnLoadCallback(draw_all);
>
585a594,595
> </head>
> <body>
626a637,639
>
> </body>
> </html>`
from articles.
You're right, the Google Visualization API has to be loaded before, that is missing on the generator. I fixed it in 3b4868d
from articles.
Thanks. A usage comment in the README wouldn't hurt, but with this change I would have figured it out without any googling.
from articles.
You're right. But I never thought of this as a usable API. The next time I add some code in this repository for an article, I will try to clean it all.
from articles.
Related Issues (10)
- typo: std::lock_guard<std::mutex> guar(mutex); HOT 1
- minor update to condition_variable example HOT 2
- Copy-past mistake HOT 1
- fold_sum_1, fold_mul_1 need init value for null parameter case HOT 1
- build fails HOT 3
- Build fails :( HOT 2
- build fails, HOT 2
- weird chrono time HOT 8
- make failed 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 articles.