Hi,
I've been looking at linecharts and all examples I've seen as well as the api suggest that only numerical data can be set on the y-axis while string data can be used on the x-axis.
Is it possible to set string based data on the y-axis and numerical data on the x-axis?
Something similar to barchart vs columnchart
Thanks
linechart possible to switch axes?
I've tried to get around this issue by using a labelfunction which outputs a string but again the function can only be passed a numerical based value specified in chartseries.
Can anyone suggest any possible solutions?
Thanks
Can anyone suggest any possible solutions?
Thanks
PrimeFaces 3.1.1, Tomcat 7.1, Hibernate 4.1.4 Final, Mac os x, Eclipse Indigo IDE
Came up with a solution where a seperate javascript object is set on page load function with corresponding id:label pairings.
The linechart label function then retrieves the corresponding label for the the passed in id, returning that value
The linechart label function then retrieves the corresponding label for the the passed in id, returning that value
Code: Select all
var labels= new Object();
function getLabel(value) {
return labels[value];
}
window.onload=function(){
lables= #{backingBean.labelNames};
}
Last edited by gopower on 24 Nov 2010, 13:04, edited 1 time in total.
PrimeFaces 3.1.1, Tomcat 7.1, Hibernate 4.1.4 Final, Mac os x, Eclipse Indigo IDE
Hey,
I made a crude patch to enable axis switching. See http://code.google.com/p/primefaces/iss ... ail?id=602 and do not forget to vote for this issue!!!
Regards,
Vladimir
I made a crude patch to enable axis switching. See http://code.google.com/p/primefaces/iss ... ail?id=602 and do not forget to vote for this issue!!!
Regards,
Vladimir
-
- Information
-
Who is online
Users browsing this forum: No registered users and 71 guests