So, my honeymoon with Primefaces charts was ended abruptly. Oops, spanner in the works!! I tried to use a ui:repeat to force it to render a dynamic number of p:chartSeries, but that didn’t work. Unfortunately, Primefaces assumes that I know them before hand, in which case all I needed was to specify each p:chartSeries with label and value. The number of points on which data is collected in my application is flexible, therefore I do not know before hand the number of “series” that I have to display. Just when I was getting ready to enjoy splattering my pages with charts all over, I came across a problem. Sweet! Simply using my own model and basic collections, I had my data all ready to go. For my needs, which is a bar char, all that was needed was something like the ff from their own documentation: All I needed was to create a Map containing text and data points for a pie chart. The chart components were quite may and as cool as Primefaces always tends to be, and it’s model was quite easy to work with. I “mavened” it and configured it alongside Richfaces, without any complaint. The documentation was also quite detailed from PDF and html docs as well from forums, so I was bound to have a good time, or so I hoped. It comes with quite an impressive set of components, and will definitely fill in the holes that Richfaces has left quite nicely, with all the cool items like Accordions, Carousels, Docks (for MacOS fans), an IdleMonitor, ImageCropper and the rest. I’d already heard and read about Primefaces, and the reviews were quite positive. It was a pity though that Richfaces didn’t have one, because most of their components seem to be fully fleshed, and I don’t tend to need other components libraries unless they don’t have it. ![]() One of the important considerations was that this library had to be compatible with Richfaces, since that was my default jsf library until further notice. So I set myself the task of looking around for libraries that could provide me this charting support. ![]() I’ve been playing around with a small application that needs to display results of data collection in a chart as a certain selection is made on the jsf page.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |