Giter VIP home page Giter VIP logo

dpeges's Introduction

GitHub version

DPE-GES

A pure javascript utility to generate an SVG graph for DPE and GES diagnostics. No dependency needed, no need jQuery or RaphaelJS

DPE : Diagnostic de performance énergétique (Energy Performance Diagnostic)
GES : Gaz à effet de serre (Greenhouse Gas Emissions)

Installation

Just copy the dpeges.js file in your scripts folder.

You can also use bower:

$ bower install dpeges

Basic example

<!DOCTYPE HTML>
<html>
  <head>
    <meta charset="utf-8">
    <title>GES/DPE basic example</title>
  <head>
  <body>
    <div id="dpe"></div>
    <div id="ges"></div>

    <script src="dpeges.js"></script>
    <script type="text/javascript">
      var dpe = new DpeGes();
      dpe.dpe({
        domId: 'dpe',
        value: 210,
      });
      var ges = new DpeGes();
      ges.ges({
        domId: 'ges',
        value: 'C'
      });
    </script>

  </body>
</html>

Options

Option name Description Required Default value
domId The id of the element that will contain the generated SVG image Yes
value The DPE or GES actual value, can be an integer or just a letter No 200
width The width of the generated SVG image No 250
height The height of the generated SVG image No 200
shadow Add shadow to the image No false
lang The language to use (currently supported: 'fr' and 'en') No 'fr'

Demo

http://pascalz.github.io/dpeges/

dpeges's People

Contributors

pascalz avatar izimobil avatar

Watchers

James Cloos avatar Rémy Sclippa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.