JS charting library that can do bar charts from series of time

L

lunaclaire

I'm working on a proj where we need to plot a series of time durations
as a bar chart.

Currently, we've been using JSChart for various charts, but I now need
to plot a data series that displays the bars labeled with the time
durations in "mm:ss" format and it seems like JSChart can only take a
series of decimal numbers for its plotting and then uses those values
for the labels. It also seems that the y-axis can only be labeled with
the same decimal valued scale (vs one with diff time intervals).

And in searching thru other packages, I cant find anything that does
things differently.

One thing that might work is if a package would take a data array that
would have separate values for what's used for the plotting of each
data pt and what's used to label it. But I havent found anything that
does it that way either.

Does anyone know of a JS library that can handle time values and
display bar values with a formatted string?
 
E

Evertjan.

lunaclaire wrote on 24 jun 2010 in comp.lang.javascript:
I'm working on a proj where we need to plot a series of time durations
as a bar chart.

Currently, we've been using JSChart for various charts, but I now need
to plot a data series that displays the bars labeled with the time
durations in "mm:ss" format and it seems like JSChart can only take a
series of decimal numbers for its plotting and then uses those values
for the labels. It also seems that the y-axis can only be labeled with
the same decimal valued scale (vs one with diff time intervals).

And in searching thru other packages, I cant find anything that does
things differently.

One thing that might work is if a package would take a data array that
would have separate values for what's used for the plotting of each
data pt and what's used to label it. But I havent found anything that
does it that way either.

Does anyone know of a JS library that can handle time values

You don't need a library for that,
just do:

var secs = 60 * min + sec;

[This is primary school stuf]
and display bar values

Why go for libraries, Javascript clientside plotting is fast and logical.
with a formatted string?

Could there be unformatted strings?

The "bar values" could be in floating divs.

===========================

This is from 2003 [the view-source is outdated]:
<http://devrijehuisarts.org/test/jsgraph.asp>

Or you can use floating color filled divs of any size.

Or you can let do it serverside on their server.
<http://code.google.com/intl/nl/apis/charttools/>
 
D

Dave

lunaclaire said:
I'm working on a proj where we need to plot a series of time durations
as a bar chart.

Currently, we've been using JSChart for various charts, but I now need
to plot a data series that displays the bars labeled with the time
durations in "mm:ss" format and it seems like JSChart can only take a
series of decimal numbers for its plotting and then uses those values
for the labels. It also seems that the y-axis can only be labeled with
the same decimal valued scale (vs one with diff time intervals).

And in searching thru other packages, I cant find anything that does
things differently.

One thing that might work is if a package would take a data array that
would have separate values for what's used for the plotting of each
data pt and what's used to label it. But I havent found anything that
does it that way either.

Does anyone know of a JS library that can handle time values and
display bar values with a formatted string?

I have no idea if it meets your requirements, having never used it yet,
but you could take a look at http://www.highcharts.com/ which is the
new-ish sister product of the highly recommended http://www.highslide.com/

Even if it doesn't do what you want, the support forum is excellent and
the author would probably add whatever functionality you wanted.
 
L

lunaclaire

lunaclaire wrote on 24 jun 2010 in comp.lang.javascript:


I'm working on a proj where we need to plot a series of time durations
as a bar chart.
Currently, we've been using JSChart for various charts, but I now need
to plot a data series that displays the bars labeled with the time
durations in "mm:ss" format and it seems like JSChart can only take a
series of decimal numbers for its plotting and then uses those values
for the labels. It also seems that the y-axis can only be labeled with
the same decimal valued scale (vs one with diff time intervals).
And in searching thru other packages, I cant find anything that does
things differently.
One thing that might work is if a package would take a data array that
would have separate values for what's used for the plotting of each
data pt and what's used to label it. But I havent found anything that
does it that way either.
Does anyone know of a JS library that can handle time values

You don't need a library for that,
just do:

var secs = 60 * min + sec;

[This is primary school stuf]
and display bar values

Why go for libraries, Javascript clientside plotting is fast and logical.
 with a formatted string?

Could there be unformatted strings?

The "bar values" could be in floating divs.
Thx for the reply but perhaps I didnt state my problem clearly
enough...

* I do have the data in a decimal format representing duration in
minutes

* I need to display a bar or column graph with the y-axis scale and
labels showing for each of the bars in a "hh:mm:ss" format (e.g. a
value of 1.5 should display as "01:30", a value of 64.25 as
"01:04:15")

* the simple html/css solutions you suggest dont give enough
customization that we need

* Google's charting (and every other one I've looked at so far) only
accept data arrays of decimal numbers and do the labeling of bars and
y-axis based on those values

So, my question remains... How do use non-decimal string values for
labels of generated charts?
===========================

This is from 2003 [the view-source is outdated]:
<http://devrijehuisarts.org/test/jsgraph.asp>

Or you can use floating color filled divs of any size.

Or you can let do it serverside on their server.
<http://code.google.com/intl/nl/apis/charttools/>
 
L

lunaclaire

Thx for the reply. That looks like a really nice package, but again it
only accepts decimal values for the data. But I will contact them to
see if they have a way to do what I need.
 
E

Evertjan.

lunaclaire wrote on 24 jun 2010 in comp.lang.javascript:
Thx for the reply but perhaps I didnt state my problem clearly
enough...

* I do have the data in a decimal format representing duration in
minutes

* I need to display a bar or column graph with the y-axis scale and
labels showing for each of the bars in a "hh:mm:ss" format (e.g. a
value of 1.5 should display as "01:30", a value of 64.25 as
"01:04:15")

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?
* the simple html/css solutions you suggest dont give enough
customization that we need

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.
* Google's charting (and every other one I've looked at so far) only
accept data arrays of decimal numbers and do the labeling of bars and
y-axis based on those values

You see, libraries of any kind confines you.
So, my question remains... How do use non-decimal string values for
labels of generated charts?

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>
=========================================
 
L

lunaclaire

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?

No, no, no.

I'm never sure, in forums where people request help and others gladly
give it, why people like you respond with such an arrogant, lecturing,
and dismissive tone. Please save yourself and others time by not
bothering to reply in such a non-useful manner.

---

As stated twice, it's not a problem either having the values in
decimal or time format (we're already generating those)... my problem
is in getting the time format's displayed on the bars of the chart.

I and my client are not interested in me writing a charting package.
We're simply looking to replace what they have in place (which is
being used to display various pie, bar/column, and line charts with a
bunch of features) with something that has the missing capability
needed.

Anyone else have any recommendations?


lunaclaire wrote on 24 jun 2010 in comp.lang.javascript:
Thx for the reply but perhaps I didnt state my problem clearly
enough...
* I do have the data in a decimal format representing duration in
minutes
* I need to display a bar or column graph with the y-axis scale and
labels showing for each of the bars in a "hh:mm:ss" format (e.g. a
value of 1.5 should display as "01:30", a value of 64.25 as
"01:04:15")

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?
* the simple html/css solutions you suggest dont give enough
customization that we need

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.
* Google's charting (and every other one I've looked at so far) only
accept data arrays of decimal numbers and do the labeling of bars and
y-axis based on those values

You see, libraries of any kind confines you.
So, my question remains... How do use non-decimal string values for
labels of generated charts?

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>
=========================================
 
L

Lasse Reichstein Nielsen

lunaclaire said:
As stated twice, it's not a problem either having the values in
decimal or time format (we're already generating those)... my problem
is in getting the time format's displayed on the bars of the chart.

So the problem is, basically, to find a bar chart library that allows
the value and label of a bar to be specified separatly.
That the values are actually time values is unimportant i that respect.
I and my client are not interested in me writing a charting package.
We're simply looking to replace what they have in place (which is
being used to display various pie, bar/column, and line charts with a
bunch of features) with something that has the missing capability
needed.

What are the constraits? Does it have to be javascript, with charts
being created in the browser, or could it be server-side?
Does it have to look in any specific way (e.g., must be horizontal or
vertical)?
Anyone else have any recommendations?

How about just using google charts?
http://code.google.com/apis/chart/docs/gallery/bar_charts.html

/L
 
E

Evertjan.

lunaclaire wrote on 25 jun 2010 in comp.lang.javascript:
No, no, no.

I'm never sure, in forums where people request help and others gladly
give it, why people like you respond with such an arrogant, lecturing,
and dismissive tone. Please save yourself and others time by not
bothering to reply in such a non-useful manner.

This is not a helpdesk forum, but usenet.
Here the asking party does not define the constraints of a response.
You do not determine what another should think useful.

I think my admonitions are very useful for you, as you are using a wrong
concept. position:absolute; positioning is the way to go here.
As stated twice, it's not a problem either having the values in
decimal or time format (we're already generating those)... my problem
is in getting the time format's displayed on the bars of the chart.

You are forgetting I showed you a nice way to do this with serverside
Javascript and CSS. Please look back and tell us what is wrong about
that idea.

Are you advising your client to do this without serverside scripting?
I and my client are not interested in me writing a charting package.

Wel if you are a professional you are the doctor. You should have the
lead in how the result should be generated. If you do not do that you
are mistreating your client, even though he wants you to.

If you are the taxidriver your client says where he wants to go, but you
decide about the adhering to the trafficrules, because you must assume
he realy wants to get there safely.
We're simply looking to replace what they have in place (which is
being used to display various pie, bar/column, and line charts with a
bunch of features) with something that has the missing capability
needed.

So you are not asking for a Javascript solution at all?
If so you chose the wrong NG.
Anyone else have any recommendations?

Not if you do not ask for Javascript scripting solutions, methinks.
 
S

Scott Sauyet

lunaclaire said:
Currently, we've been using JSChart for various charts, but I now need
to plot a data series that displays the bars labeled with the time
durations in "mm:ss" format and it seems like JSChart can only take a
series of decimal numbers for its plotting and then uses those values
for the labels. It also seems that the y-axis can only be labeled with
the same decimal valued scale (vs one with diff time intervals).

And in searching thru other packages, I cant find anything that does
things differently.

It didn't take long in Google to find Bluff [1], which I've never
used, but which has an example on its front page that includes this:

g.labels = {0: '2003', 2: '2004', 4: '2005'};

Could a technique like this get you what you need?

(BTW, I think you owe Evertjan an apology. Yes, his or her posts came
across as a bit clueless and still over-opinionated, but he or she was
in fact trying to help and offering what seem to be reasonable
alternatives.)

[1] http://bluff.jcoglan.com/
 
D

Dr J R Stockton

In comp.lang.javascript message <c192fd33-b52c-4c62-a7b6-93dfbe8b2095@y1
1g2000yqm.googlegroups.com>, Thu, 24 Jun 2010 09:20:30, lunaclaire
I'm working on a proj where we need to plot a series of time durations
as a bar chart.

Currently, we've been using JSChart for various charts, but I now need
to plot a data series that displays the bars labeled with the time
durations in "mm:ss" format and it seems like JSChart can only take a
series of decimal numbers for its plotting and then uses those values
for the labels. It also seems that the y-axis can only be labeled with
the same decimal valued scale (vs one with diff time intervals).

A moderately competent programmer might be helped by looking at what I
have done with divs in
<URL:http://www.merlyn.demon.co.uk/js-misc1.htm>
or, for up-to-date browsers, on a canvas in
<URL:http://www.merlyn.demon.co.uk/js-grphx.htm>.

Can you get such a person to work for you?
 
L

lunaclaire

Thx for your response, Scott

First - Glad to apologize to Evertjan... not looking for a flame war,
just some help for the problem I'm trying to solve.

Second - I already knew about Bluff, but the code frag you pt'd out is
for the labels on the x-axis, not for the bars themselves. Note on
that page you link to that just above your fragment the data passed in
for the bars (and what's used to label the bars) is the same set of
decimal numbers that I see on just about all of the solutions. Since I
work in Ruby I've considered starting with Gruff and adding my own
enhancements to get what the client needs.

Third - Something I finally found that might help me and others is
this:

http://xaviershay.github.com/tufte-graph/index.html

it let's you define a callback fxn where you can do whatever's needed
for the labeling. That looks like it'll work for me, so I just need to
see if the rest of what it can do meets the client's req's.

Thsx again to all for the suggestions.


lunaclaire said:
Currently, we've been using JSChart for various charts, but I now need
to plot a data series that displays the bars labeled with the time
durations in "mm:ss" format and it seems like JSChart can only take a
series of decimal numbers for its plotting and then uses those values
for the labels. It also seems that the y-axis can only be labeled with
the same decimal valued scale (vs one with diff time intervals).
And in searching thru other packages, I cant find anything that does
things differently.

It didn't take long in Google to find Bluff [1], which I've never
used, but which has an example on its front page that includes this:

    g.labels = {0: '2003', 2: '2004', 4: '2005'};

Could a technique like this get you what you need?

(BTW, I think you owe Evertjan an apology.  Yes, his or her posts came
across as a bit clueless and still over-opinionated, but he or she was
in fact trying to help and offering what seem to be reasonable
alternatives.)

[1]http://bluff.jcoglan.com/
 
L

lunaclaire

after revisiting this, I quickly came upon a solution that I hadnt
spotted before... Google Charts does what I was looking for all along.
Evertjan and Lasse had suggested Google Charts, but the solution was
buried in all their docs and I didnt see it. Whoops.

If anyone else is looking for a way to label bars on a chart with
*markers* (that was a term I hadnt thought of) containing arbitrary
non numerical strings corresponding to the numerical values used to
plot the bars, Google Charts provides and easy to use means by use of
the 'chm' parameter.

Thx again for everyone's ideas.

Thx for your response, Scott

First - Glad to apologize to Evertjan... not looking for a flame war,
just some help for the problem I'm trying to solve.

Second - I already knew about Bluff, but the code frag you pt'd out is
for the labels on the x-axis, not for the bars themselves. Note on
that page you link to that just above your fragment the data passed in
for the bars (and what's used to label the bars) is the same set of
decimal numbers that I see on just about all of the solutions. Since I
work in Ruby I've considered starting with Gruff and adding my own
enhancements to get what the client needs.

Third - Something I finally found that might help me and others is
this:

http://xaviershay.github.com/tufte-graph/index.html

it let's you define a callback fxn where you can do whatever's needed
for the labeling. That looks like it'll work for me, so I just need to
see if the rest of what it can do meets the client's req's.

Thsx again to all for the suggestions.

It didn't take long in Google to find Bluff [1], which I've never
used, but which has an example on its front page that includes this:
    g.labels = {0: '2003', 2: '2004', 4: '2005'};
Could a technique like this get you what you need?
(BTW, I think you owe Evertjan an apology.  Yes, his or her posts came
across as a bit clueless and still over-opinionated, but he or she was
in fact trying to help and offering what seem to be reasonable
alternatives.)
 
L

lunaclaire

after revisiting this, I quickly came upon a solution that I hadnt
spotted before... Google Charts does what I was looking for all along.
Evertjan and Lasse had suggested Google Charts, but the solution was
buried in all their docs and I didnt see it. Whoops.

If anyone else is looking for a way to label bars on a chart with
*markers* (that was a term I hadnt thought of) containing arbitrary
non numerical strings corresponding to the numerical values used to
plot the bars, Google Charts provides and easy to use means by use of
the 'chm' parameter.

Thx again for everyone's ideas.

Thx for your response, Scott

First - Glad to apologize to Evertjan... not looking for a flame war,
just some help for the problem I'm trying to solve.

Second - I already knew about Bluff, but the code frag you pt'd out is
for the labels on the x-axis, not for the bars themselves. Note on
that page you link to that just above your fragment the data passed in
for the bars (and what's used to label the bars) is the same set of
decimal numbers that I see on just about all of the solutions. Since I
work in Ruby I've considered starting with Gruff and adding my own
enhancements to get what the client needs.

Third - Something I finally found that might help me and others is
this:

http://xaviershay.github.com/tufte-graph/index.html

it let's you define a callback fxn where you can do whatever's needed
for the labeling. That looks like it'll work for me, so I just need to
see if the rest of what it can do meets the client's req's.

Thsx again to all for the suggestions.

It didn't take long in Google to find Bluff [1], which I've never
used, but which has an example on its front page that includes this:
    g.labels = {0: '2003', 2: '2004', 4: '2005'};
Could a technique like this get you what you need?
(BTW, I think you owe Evertjan an apology.  Yes, his or her posts came
across as a bit clueless and still over-opinionated, but he or she was
in fact trying to help and offering what seem to be reasonable
alternatives.)
 
L

lunaclaire

after revisiting this, I quickly came upon a solution that I hadnt
spotted before... Google Charts does what I was looking for all along.
Evertjan and Lasse had suggested Google Charts, but the solution was
buried in all their docs and I didnt see it. Whoops.

If anyone else is looking for a way to label bars on a chart with
*markers* (that was a term I hadnt thought of) containing arbitrary
non numerical strings corresponding to the numerical values used to
plot the bars, Google Charts provides and easy to use means by use of
the 'chm' parameter.

Thx again for everyone's ideas.

Thx for your response, Scott

First - Glad to apologize to Evertjan... not looking for a flame war,
just some help for the problem I'm trying to solve.

Second - I already knew about Bluff, but the code frag you pt'd out is
for the labels on the x-axis, not for the bars themselves. Note on
that page you link to that just above your fragment the data passed in
for the bars (and what's used to label the bars) is the same set of
decimal numbers that I see on just about all of the solutions. Since I
work in Ruby I've considered starting with Gruff and adding my own
enhancements to get what the client needs.

Third - Something I finally found that might help me and others is
this:

http://xaviershay.github.com/tufte-graph/index.html

it let's you define a callback fxn where you can do whatever's needed
for the labeling. That looks like it'll work for me, so I just need to
see if the rest of what it can do meets the client's req's.

Thsx again to all for the suggestions.

It didn't take long in Google to find Bluff [1], which I've never
used, but which has an example on its front page that includes this:
    g.labels = {0: '2003', 2: '2004', 4: '2005'};
Could a technique like this get you what you need?
(BTW, I think you owe Evertjan an apology.  Yes, his or her posts came
across as a bit clueless and still over-opinionated, but he or she was
in fact trying to help and offering what seem to be reasonable
alternatives.)
 
L

lunaclaire

after revisiting this, I quickly came upon a solution that I hadnt
spotted before... Google Charts does what I was looking for all along.
Evertjan and Lasse had suggested Google Charts, but the solution was
buried in all their docs and I didnt see it. Whoops.

If anyone else is looking for a way to label bars on a chart with
*markers* (that was a term I hadnt thought of) containing arbitrary
non numerical strings corresponding to the numerical values used to
plot the bars, Google Charts provides and easy to use means by use of
the 'chm' parameter.

Thx again for everyone's ideas.

Thx for your response, Scott

First - Glad to apologize to Evertjan... not looking for a flame war,
just some help for the problem I'm trying to solve.

Second - I already knew about Bluff, but the code frag you pt'd out is
for the labels on the x-axis, not for the bars themselves. Note on
that page you link to that just above your fragment the data passed in
for the bars (and what's used to label the bars) is the same set of
decimal numbers that I see on just about all of the solutions. Since I
work in Ruby I've considered starting with Gruff and adding my own
enhancements to get what the client needs.

Third - Something I finally found that might help me and others is
this:

http://xaviershay.github.com/tufte-graph/index.html

it let's you define a callback fxn where you can do whatever's needed
for the labeling. That looks like it'll work for me, so I just need to
see if the rest of what it can do meets the client's req's.

Thsx again to all for the suggestions.

It didn't take long in Google to find Bluff [1], which I've never
used, but which has an example on its front page that includes this:
    g.labels = {0: '2003', 2: '2004', 4: '2005'};
Could a technique like this get you what you need?
(BTW, I think you owe Evertjan an apology.  Yes, his or her posts came
across as a bit clueless and still over-opinionated, but he or she was
in fact trying to help and offering what seem to be reasonable
alternatives.)
 
L

lunaclaire

after revisiting this, I quickly came upon a solution that I hadnt
spotted before... Google Charts does what I was looking for all along.
Evertjan and Lasse had suggested Google Charts, but the solution was
buried in all the docs and I didnt see it. Whoops.

If anyone else is looking for a way to label bars on a chart with
*markers* (that was a term I hadnt thought of) containing arbitrary
non numerical strings corresponding to the numerical values used to
plot the bars, Google Charts provides and easy to use means by use of
the 'chm' parameter.

Thx again for everyone's ideas.
Thx for your response, Scott

First - Glad to apologize to Evertjan... not looking for a flame war,
just some help for the problem I'm trying to solve.

Second - I already knew about Bluff, but the code frag you pt'd out is
for the labels on the x-axis, not for the bars themselves. Note on
that page you link to that just above your fragment the data passed in
for the bars (and what's used to label the bars) is the same set of
decimal numbers that I see on just about all of the solutions. Since I
work in Ruby I've considered starting with Gruff and adding my own
enhancements to get what the client needs.

Third - Something I finally found that might help me and others is
this:

http://xaviershay.github.com/tufte-graph/index.html

it let's you define a callback fxn where you can do whatever's needed
for the labeling. That looks like it'll work for me, so I just need to
see if the rest of what it can do meets the client's req's.

Thsx again to all for the suggestions.

It didn't take long in Google to find Bluff [1], which I've never
used, but which has an example on its front page that includes this:
    g.labels = {0: '2003', 2: '2004', 4: '2005'};
Could a technique like this get you what you need?
(BTW, I think you owe Evertjan an apology.  Yes, his or her posts came
across as a bit clueless and still over-opinionated, but he or she was
in fact trying to help and offering what seem to be reasonable
alternatives.)
 
L

lunaclaire

after revisiting this, I quickly came upon a solution that I hadnt
spotted before... Google Charts does what I was looking for all along.
Evertjan and Lasse had suggested Google Charts, but the solution was
buried in all the docs and I didnt see it. Whoops.

If anyone else is looking for a way to label bars on a chart with
*markers* (that was a term I hadnt thought of) containing arbitrary
non numerical strings corresponding to the numerical values used to
plot the bars, Google Charts provides and easy to use means by use of
the 'chm' parameter.

Thx again for everyone's ideas.
Thx for your response, Scott

First - Glad to apologize to Evertjan... not looking for a flame war,
just some help for the problem I'm trying to solve.

Second - I already knew about Bluff, but the code frag you pt'd out is
for the labels on the x-axis, not for the bars themselves. Note on
that page you link to that just above your fragment the data passed in
for the bars (and what's used to label the bars) is the same set of
decimal numbers that I see on just about all of the solutions. Since I
work in Ruby I've considered starting with Gruff and adding my own
enhancements to get what the client needs.

Third - Something I finally found that might help me and others is
this:

http://xaviershay.github.com/tufte-graph/index.html

it let's you define a callback fxn where you can do whatever's needed
for the labeling. That looks like it'll work for me, so I just need to
see if the rest of what it can do meets the client's req's.

Thsx again to all for the suggestions.

It didn't take long in Google to find Bluff [1], which I've never
used, but which has an example on its front page that includes this:
    g.labels = {0: '2003', 2: '2004', 4: '2005'};
Could a technique like this get you what you need?
(BTW, I think you owe Evertjan an apology.  Yes, his or her posts came
across as a bit clueless and still over-opinionated, but he or she was
in fact trying to help and offering what seem to be reasonable
alternatives.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top