Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

Could you please help me to draw bar chart using prime faces.

Here I found horizontal and stacked bar chart

PrimeFaces ShowCase[^]

I want Vertical and Stacked bar chart.

Thanks in advance.

What I have tried:

I have already googled and checked all available link. But unable to find solution.
Posted
Updated 17-Sep-17 20:32pm
Comments
Richard MacCutchan 18-Sep-17 3:41am    
The first image on that page is a vertical bar chart. What do you not understand about it?
[no name] 18-Sep-17 3:51am    
Dear Richard,

Thanks for reply.

I have written in bold, I am looking for Vertical and Stacked bar chart.
Richard MacCutchan 18-Sep-17 7:19am    
The sample code shows how to do it.

1 solution

You know that the page that you have linked to has a source code tab called ChartView.java? The answer to your question is right there!

UPDATE: Reading the code on this page, what determines a Stacked versus regular chart is this line:
Java
horizontalBarModel.setStacked(true);
 
Share this answer
 
v2
Comments
[no name] 18-Sep-17 2:48am    
Thank you for reply. Could you please suggest the changes in ChartView.java. I have tried my best to achieve the requirement.
Graeme_Grant 18-Sep-17 2:53am    
I don't understand. It is a working version.
[no name] 18-Sep-17 3:18am    
Yes it is a working version. Currently I am showing horizontal stacked bar chart using that link code but user requirement is vertical stacked bar chart.
Graeme_Grant 18-Sep-17 5:23am    
Please check out the update above.
[no name] 18-Sep-17 5:48am    
Let me try by setting that value false.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900