thepinke
unread,Feb 21, 2008, 4:10:09 AM2/21/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to plotkit
Hi ,
I am a beginner with PlotKit and have managed to get some basic Pie
and bar charts working.I have 2 questions :
1) I am having some trouble setting up the lables on the x and Y axis.
I am currently using DWR to get the values from Java . I tried
creating the xTicks var as follws :
for (var I in graphLabelValues) {
var str = "{v:"+I+", label:" +graphLabelValues[I][1]+"}";
xtix[I] = str;
}
where "graphLabelValues" is an array that is returned from a DWR
javascript object. Finally , I assing xtix to "xTicks" and set that in
the options. The above is not working and I keep getting "Object
Error"
Is there a easy way to set the lables ?
I am getting the values from a simple javabean as getLabels() and
getValues() as arrays and want to know if theres some way I can easily
set them in PlotKit ?...
like so perhaps : PlotKit.addLabel("labl1","lab2","labl3");
2) Is it possible to color each bar or slice differently ? I dont want
to use the basic "shades" of one color
but use blue for one slice,red for another one,yellow for another etc.
how do we set the color for each bar or slice?
( I would like to set the color based on the lable value )
thanks for hints !!
Pat