Skip to content

Include xplot in FsSnip.WebSite #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

forki
Copy link
Contributor

@forki forki commented Dec 7, 2015

This is a hacky proof of concept to see if fssnip can work with XPlot.

image

/cc @tforkmann

I plan to create a more useful graph.

@forki forki changed the title Proof of concept to include xplot in FsSnip.WebSite WIP: Proof of concept to include xplot in FsSnip.WebSite Dec 7, 2015
@forki forki force-pushed the plot branch 2 times, most recently from f1acdfd to ccef436 Compare December 7, 2015 14:09
{% endblock %}

{% block customPageScripts %}
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TahaHachana is there an easy way to generate this script snippet block?
imag.Js is missing the google.load("visualization", "1", { packages: ["corechart"] }) part and doesn't load https://www.google.com/jsapi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For server side usage and IDE integration I left loading the appropriate visualization packages to the user. According to the screenshots below this wasn't a showstopper for you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no it works fine, but now I have to add this boilerplate to all html files.
a property with this part would be useful for me.

2015-12-07 17:40 GMT+01:00 Taha Hachana [email protected]:

In templates/graph.html
#46 (comment)
:

@@ -0,0 +1,21 @@
+{% extends "page.html" %}
+{% block head %}

  • <title>Home page | F# Snippets</title>

+{% endblock %}
+
+{% block customPageScripts %}
+<script type="text/javascript" src="https://www.google.com/jsapi"></script>

For server side usage and IDE integration I left loading the appropriate
visualization packages to the user. According to the screenshots below this
wasn't a showstopper for you.


Reply to this email directly or view it on GitHub
https://github.com/tpetricek/FsSnip.Website/pull/46/files#r46843249.

@tpetricek
Copy link
Member

Looks pretty :) having some cool stats about the snippets on the page would be cool - if that's what you're thinking!

At first, I though this is trying to allow embedding of charts that people create in snippets, which would be cool too - but that's hard to do if we don't want to allow people to run arbitrary code on our server...

@forki
Copy link
Contributor Author

forki commented Dec 7, 2015

Yes it's intended to show stats about stuff in the db. Maybe contribution
count over time or top n contributors.

Tbh we started to use fssnip as a sample app for suave website. So graphs
are important for us.
On Dec 7, 2015 3:23 PM, "Tomas Petricek" [email protected] wrote:

Looks pretty :) having some cool stats about the snippets on the page
would be cool - if that's what you're thinking!

At first, I though this is trying to allow embedding of charts that people
create in snippets, which would be cool too - but that's hard to do if we
don't want to allow people to run arbitrary code on our server...


Reply to this email directly or view it on GitHub
#46 (comment)
.

@forki
Copy link
Contributor Author

forki commented Dec 7, 2015

image

@forki
Copy link
Contributor Author

forki commented Dec 7, 2015

image

@forki
Copy link
Contributor Author

forki commented Dec 7, 2015

I tried calendar chart, but it doesn't look cool:

image

@forki
Copy link
Contributor Author

forki commented Dec 7, 2015

image

I think I'm out of ideas for now.

@forki forki changed the title WIP: Proof of concept to include xplot in FsSnip.WebSite Include xplot in FsSnip.WebSite Dec 7, 2015
@tforkmann
Copy link

Looking good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants