• 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

cewolf charts color

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

I use cewolf to draw a chart in my jsp file.

I want to control set the color of the chart (of every series)

I use this code at the jsp file :

and to add to the dataset data I use this code :



how can I change the colors ?

success draws in blue color
and fail draws in red color

I want the success will draw in green color.
how can I change the color ?


thanks
 
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 by me (and you should, it'll become the official one, see the link in my signature) then you can use de.laures.cewolf.cpp.SeriesPaintProcessor postprocessor for this. The cewolfset.jsp page of the example web app shows how to do that for pie charts.
 
anvi kon
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please send me the example for color?

I could not find the example
 
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
Download the distribution from my web site. It contains a ready-to-run web app that has that JSP page.
 
anvi kon
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have included the cewolfset.jsp page in my project. It is giving me this error
cewolfset.jsp(301,4) No tag "chartpostprocessor" defined in tag library imported with prefix "cewolf"
Error statusCode: 500

Can you help me please?

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
You need to use it with the jar files that come with my distribution.
 
anvi kon
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using for stackedverticalbar3d


In my jsp page. I have included like below.

I want to see differnet colors on this different categories. So far I have done like below.But I didn't see the different colors.










Can you correct 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 chartpostprocessor tag is inside the gradientpaint tag - that won't work. It needs to be a child of the chart tag.
 
anvi kon
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did it, but still don't see the different colors on categories.
 
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
Take a look at the log file - it contains the explanation. The gist is that you can't define postprocessors in the JSP page; they'll need to be Java classes. But since the SeriesPaintProcessor works fine, there's no real need to do so.
 
anvi kon
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
which log file I have to look?
 
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 log file of your servlet container, whichever that may be. For Tomcat, it would be logs/catalina.out.
 
anvi kon
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got this error


ChartPostProcessor org.apache.jsp.SummaryChart_jsp$1 implements neither Serializable nor NonSerializableChartPostProcessor. It will be ignored.


Did I miss anything?

Please let me know


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
That's it. It tells you that the postprocessor class you defined won't be used, because it doesn't implement either one of those interfaces. Of course, it *can't* implement *any* interface, because it's defined in a JSP. That's what I meant earlier by saying that postprocessors need to be defined in Java code, not in JSPs.
 
anvi kon
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In java code, do I have to implement Chartpostprocessor and also Serializable?

Can you please give me some examples?

So that it is goig to help 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 source code of the de.laures.cewolf.cpp.SeriesPaintProcessor class is a good example, because it does exactly what you're asking. I'm still not sure why you don't want to use that, though, and instead insist on rolling your own.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

anvi kon wrote:



Just a detail: <cewolf:param name="0" value="#00FF00" /> is simpler.
Thanks, Ulf, for cewolf 1.1, and for very helpful interaction here. I've just started using SeriesPaintProcessor.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic