import-bot (20212) [Avatar] Offline
#1
Re: image mapping bar graphs?
[Originally posted by buddha]

Sorry, there should be "" marks in front of the array references but the
message generator deleted them when I submitted my message.
import-bot (20212) [Avatar] Offline
#2
Re: image mapping bar graphs?
[Originally posted by buddha]

backslash marks! There should be backslash marks but they keep getting deleted
by this message submitter.
import-bot (20212) [Avatar] Offline
#3
[Originally posted by buddha]

I would like to generate GD bar graphs that are image mapped and
hyperlinked such that when you do a mouse over of a given bar in the graph you
get an alt tag describing that bar and when you click on the bar you link to
additional information regarding the characterisitics of the data represented
by that bar.
Is there a way to do this on the fly using the settings for
$chart->plot(@data)? (Or is there any other way to do this?) For example, by
providing additional array references for the plot that had the hyperlinks and
alt tags for each bar in addition to the data array reference and the x axis
labels aray reference. For example,

my @bar_graph_data_set=(
@bar_graph_samples,
@bar_graph_data,
@bar_graph_hyperlinks,
@bar_graph_alttags,
);
my $chart=GD::Graph::bars->new(1000, 350);
$chart->set(...settings...);
my $gd_object=$chart->plot(@bar_graph_data_set);

I suppose that this would involve the module keeping track of where it is
drawing bars on the graph and then generating an image map on the fly based on
these coordinates.
Thank you very much for any information you can provide!

Cheers!
-Chris
import-bot (20212) [Avatar] Offline
#4
Re: image mapping bar graphs?
[Originally posted by mgjv]

> I would like to generate GD bar graphs that are image mapped and
> hyperlinked such that when you do a mouse over of a given bar in the graph you
> get an alt tag describing that bar and when you click on the bar you link to
> additional information regarding the characterisitics of the data represented
> by that bar.

Hi Chris,

Have a look at the hotspots functionality in the current GD::Graph
implementation. You can get the information you need by using the
get_hotspots() method. This functionality has been in GD::Graph for a while
now, as experimental, but I haven't had much feedback on it, so it has not had
much development.

It's documented as one of the last items in the GD::Graph documentation.

Martien