Commit 1a402a31 authored by Antoine Blanquet's avatar Antoine Blanquet
Browse files

First Commit Antoine Blanquet - Training Sparkline + Attempt Making SVG image...

First Commit Antoine Blanquet - Training Sparkline + Attempt Making SVG image from a HTML document. Failed attempt. Current code retransmissions. On the right track
parent 08accb30
# Training Sparkline.
Envoyer un mail avec un résumé très précis . (Sparkline)
PB : envoyer par mail, possiblement pas possible avec du javascript. Alternative : Générer Sparkline, générer image et générer doc en svg.
* Step1 : Produire des faux rapports (HTML) avec des éléments Sparkline. (entrainement utilisation de sparkline)
* Step2 : Générer image du rapport HTML en SVG
* Step3 : Produire les rapports HTML avec les véritables informations des gateways.
\ No newline at end of file
This diff is collapsed.
<html xmlns="" xml:lang="en"></html>
<title>jQuery Sparklines Simple Example</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
body { font-family: helvetica, arial, san-serif; background-color: #fff; text-align: left; font-size: 0.9em; margin: 10em }
<script type="text/javascript" src="jQuery_Sparklines_Simple_Example_fichiers/jquery-1.js"></script>
<script type="text/javascript" src="jQuery_Sparklines_Simple_Example_fichiers/jquery.js"></script>
<script type="text/javascript" src="html2canvas.js"></script>
<script type="text/javascript">
$(function() {
/** This code runs when everything has been loaded on the page */
/* Inline sparklines take their values from the contents of the tag */
/* Sparklines can also take their values from the first argument
passed to the sparkline() function */
var myvalues = [10,8,5,7,4,4,1];
/* The second argument gives options such as chart type */
$('.dynamicbar').sparkline(myvalues, {type: 'bar', barColor: 'green'} );
/* Use 'html' instead of an array of values to pass options
to a sparkline with data in the tag */
$('.inlinebar').sparkline('html', {type: 'bar', barColor: 'red'} );
<div style="padding: 10px; background: #f5da55">
<h4 style="color: #000; ">Hello world!</h4>
<p id="capture">
Inline Sparkline: <span class="inlinesparkline">1,4,4,7,5,9,10</span>.
Sparkline with dynamic data: <span class="dynamicsparkline">Loading..</span>
Bar chart with dynamic data: <span class="dynamicbar">Loading..</span>
Bar chart with inline data: <span class="inlinebar">1,3,4,5,3,5</span>
<script type="text/javascript">
//* Step2 : Générer image du rapport HTML en SVG
// Test avec le rapport : jQuery_Sparklines_Simple_Example.html
//4 paragraphs différents : faisons 1 image pour chacun.
html2canvas(document.querySelector("#capture")).then(canvas => {
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment