Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
JS charting library that can do bar charts from series of time
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Evertjan., post: 5005150"] lunaclaire wrote on 24 jun 2010 in comp.lang.javascript: That is simple arythmetic, just make a function that has the value as parameter, and returns a string according to your specs. Is your Q that we write such function for you, without you trying first? This is a non-sentence, simple programming always gives the most cusstomisation, libraries confine such. "Need" seems strange, "want" would be more apt, but then your ideas about customisation are wrong. You see, libraries of any kind confines you. Just applying the function stated above. ============ A much easier way is to build your chart using serverside scripting to compute the corresponding values. To get the datavalues you will need a serverside database anyway, I presume. To be on topic here you would need to use serverside javascript. What about something like this using ASP J[ava]script serverside: =========================================================== <% 'Javascript function minutes@msd(m) { // compute the string for bartextX return ;// your task }; // compute the barXvalue, barXleft // your task %> <style type='text/css'> ..chartBackground {position:relative;width:1000px;height:500px; border:XXX;} ..bar0 {position:absolute;width:10px;height:<% = bar0value; %> px;bottom:0;left:<% = bar0left; %>;} ..bartext0 {position:absolute;width:50px;height:20px;bottom:<% = bar0value; %>px;left:<% = bar0left; %>;font-size:8pt;color:red;} ..bar1 {position:absolute;width:10px;height:<% = bar1value; %> px;bottom:0;left:<% = bar1left; %>;} ..bartext1 {position:absolute;width:50px;height:20px;bottom:<% = bar1value; %>px;left:<% = bar1left; %>;font-size:8pt;color:green;} ..bar2 {position:absolute;width:10px;height:<% = bar2value; %> px;bottom:0;left:<% = bar2left; %>;} ..bartext2 {position:absolute;width:50px;height:20px;bottom:<% = bar2value; %>px;left:<% = bar2left; %>;font-size:8pt;color:navy;} </style> <div class='chartBackground'> <div class='bar0'> <div class='bartext0'><%= bartext0; %></div> <div class='bar1'> <div class='bartext1'><%= bartext1; %></div> <div class='bar2'> <div class='bartext2'><%= bartext2; %></div> </div> ========================================= [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
JS charting library that can do bar charts from series of time
Top