• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

spaces between categories in cewolf barchart

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

can anyone help me out...
how to control the spacing between categories in a vertical barchart..
bars in same category should be close to each other.. while there should be enough space between the end of one category and start of other category..

is there any jsp tag for that in cewolf...

please help
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using the cewolf distribution I maintain (it's linked in my signature), then you can use the BarRendererProcessor chart postprocessor to set the item margin of each bar; that moves the bars closer together or farther apart. It's demonstrated in the cewolfset.jsp page that's part of the cewolfexample web app that comes with the distribution; search for "barRenderer".
 
vicky chauhan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not able to access your website for downloading the package.. i tried with chrome, mozilla, IE, but unable to.. it just shows either network timed out or a blank white page...

and could you please give an example of exact code here if possible..

and i asked a doubt in the morning also.. could you please check that post also.. it will be a great help for me..

thanks..
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The page is up, it must be a problem with your network access.

The JSP page I mentioned contains a full example of how to use the postprocessor.
 
vicky chauhan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot, I got it from example... i downloaded it from sourceforge.. i am unable to access your page still though...

I am still having the following doubt about Map params usage:

I am making a webapplication which uses cewolf to generate barchart.

1) data for the barchart should come from produceDataset(Map params) - so i have kept all the code for accessing data from database there.

2) JSP using cewolf tags will create an instance of above dataproducer class and will call that function - will get the data from database - produce the chart - happy ending.......

3) problem is, i want a primary key (say username) based on which i will retrieve rows from database related to that key only... using session.setAttribute() i am able to pull that value till final jsp which is using cewolf.

BUT I AM NOT GETTING HOW TO PASS THIS VALUE TO produceDataset(Map params) ??

Need help on this... I know i have to set params to key value in jsp and using "Map params" have to retrieve that inside produceDataset function.. BUT I DONT KNOW HOW TO DO IT ??

could anyone show example code for doing this..
a) setting params to value i want to pass to produceDataset in JSP and to retrieve those params to use with database inside produceDataset method...
 
vicky chauhan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I took the following code from the example you said: --------------------------------------------------------------------------

double min = 0;
double max = 260;
double val = 86;
double minCrit = 187;
double maxCrit = max;
double minWarn = 164;
double maxWarn = minCrit;
double maxNorm = minCrit;
double minNorm = min;

plot.setRange(new Range(min, max));

plot.addInterval(new MeterInterval("Normal",new Range(minNorm, maxNorm),Color.green, new BasicStroke(2.0f), null));

plot.addInterval(new MeterInterval("Warning",new Range(minWarn, maxWarn),Color.yellow, new BasicStroke(2.0f), null));

plot.addInterval(new MeterInterval("Critical",new Range(minCrit, maxCrit),Color.red, new BasicStroke(2.0f), null));

---------------------------------------------------------------------------

I am getting the following error:
java.lang.IllegalArgumentException raised:
Range(double,double):require lower(0.0) <= upper(-Infinity)

Could you tell what is the problem.
reply
    Bookmark Topic Watch Topic
  • New Topic