Click here to Skip to main content
12,247,901 members (47,394 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

13.2K views
12 bookmarked
Posted

Chart in HTML in 1 minute

, 25 Sep 2013 CPOL
Rate this:
Please Sign up or sign in to vote.
Chart in HTML in 1 minute.

To add a chart to your page you will need exactly one minute. We will use AWeb library. Let's connect the library to the project:

<!DOCTYPE HTML>
<html>
<head>
   <title>Sample project</title>
   
   <!-- Styles -->
   <link rel="stylesheet" type="text/css" href="http://a-web.me/styles/default/a-web.css" >
   
   <!-- Scripts -->
   <script type="text/javascript" src="http://a-web.me/scripts/a-web.js"></script>
</head>
<body>
</body>
</html>

Chart is created by tag "a:chart", chart properties are specified in the tag attributes. The x-axis will display the values from 1 to 3, scale 1. The y-axis will display the values from 1 to 10, scale 5. Chart passes through: (1,0) (2,8) (3,0)

Our example will look like this:

<!DOCTYPE HTML>
<html>
<head>
   <title>Sample project</title>
   
   <!-- Styles -->
   <link rel="stylesheet" type="text/css" href="http://a-web.me/styles/default/a-web.css" >
   
   <!-- Scripts -->
   <script type="text/javascript" src="http://a-web.me/scripts/a-web.js"></script>
</head>
<body>
   <!-- Chart -->
   <a:chart a:type="UI/Chart"
            a:axis-x="1..3/1"
            a:axis-y="0..10/5"
            a:points-1="1 0, 2 8, 3 0"
   >
   </a:chart>
</body>
</html>

The chart is created on the client side in the browser without connecting to the server. Enjoy.

Other articles about the library

Decided to join the articles, because there is not much information about the library in internet

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Member 10277780
CEO student
Russian Federation Russian Federation
No Biography provided

You may also be interested in...

Comments and Discussions

 
QuestionUnrecognized namespace 'a' Pin
kayay18-Sep-13 2:53
memberkayay18-Sep-13 2:53 
QuestionNo scream shot? Pin
Member 904013717-Sep-13 6:58
memberMember 904013717-Sep-13 6:58 
QuestionJavaScript runtime error: 'Event' is undefined Pin
Antariksh Verma16-Sep-13 21:39
professionalAntariksh Verma16-Sep-13 21:39 
AnswerRe: JavaScript runtime error: 'Event' is undefined Pin
Member 1027778017-Sep-13 2:43
memberMember 1027778017-Sep-13 2:43 
GeneralRe: JavaScript runtime error: 'Event' is undefined Pin
Antariksh Verma23-Sep-13 23:48
professionalAntariksh Verma23-Sep-13 23:48 
QuestionAmazing Question... Pin
Dewey16-Sep-13 17:56
memberDewey16-Sep-13 17:56 
AnswerRe: Amazing Question... Pin
Ranjan.D16-Sep-13 18:16
professionalRanjan.D16-Sep-13 18:16 
GeneralRe: Amazing Question... Pin
Shrikshel17-Sep-13 2:36
memberShrikshel17-Sep-13 2:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160426.1 | Last Updated 25 Sep 2013
Article Copyright 2013 by Member 10277780
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid