Click here to Skip to main content
Click here to Skip to main content

Chart in HTML in 1 minute

By , 25 Sep 2013
Rate this:
Please Sign up or sign in to vote.

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)

About the Author

Member 10277780
CEO student
Russian Federation Russian Federation
No Biography provided

Comments and Discussions

 
QuestionUnrecognized namespace 'a' Pinmemberkayay18-Sep-13 1:53 
QuestionNo scream shot? PinmemberMember 904013717-Sep-13 5:58 
QuestionJavaScript runtime error: 'Event' is undefined PinprofessionalAntariksh Verma16-Sep-13 20:39 
AnswerRe: JavaScript runtime error: 'Event' is undefined PinmemberMember 1027778017-Sep-13 1:43 
GeneralRe: JavaScript runtime error: 'Event' is undefined PinprofessionalAntariksh Verma23-Sep-13 22:48 
QuestionAmazing Question... PinmemberDewey16-Sep-13 16:56 
AnswerRe: Amazing Question... PinprofessionalRanjan.D16-Sep-13 17:16 
GeneralRe: Amazing Question... PinmemberShrikshel17-Sep-13 1:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web03 | 2.8.140415.2 | Last Updated 25 Sep 2013
Article Copyright 2013 by Member 10277780
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid