Hi,
I'm new to this community and this forum.
I am using the chart element in my website, and specifically the bar chart. unfortunately, the BarChartSeries doesn't render any changes in the default axes, meaning it only uses the x1 and y1 axes.
i read the contribution guide: https://github.com/primefaces/primeface ... IBUTING.md
It wasn't clear to me - Should i open a bug in github, or writing here is enough?
I made a local fix and it works for me, I would like to contribute this fix to the community.
Thanks
changes axes in BarChartSeries
Please post your exact issue and fix in detail here and we can determine whether it needs to be added to the source!
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
to sum it shortly:
bug: BarChartSeries does not take into count x-axis or y-axis which were set using setters during rendering.
suggested solution: add to "encode" function on BarChartSeries (which renders the element) a check for x and y axes.
added code is highlighted.
public void encode(Writer writer) throws IOException {
AxisType xaxis = this.getXaxis();
AxisType yaxis = this.getYaxis();
writer.write("{");
writer.write("label:\"" + ComponentUtils.escapeText(this.getLabel()) + "\"");
writer.write(",renderer: $.jqplot." + this.getRenderer());
if (xaxis != null) {
writer.write(",xaxis:\"" + xaxis + "\"");
}
if (yaxis != null) {
writer.write(",yaxis:\"" + yaxis + "\"");
}
if (this.disableStack) {
writer.write(",disableStack:true");
}
writer.write("}");
}
bug: BarChartSeries does not take into count x-axis or y-axis which were set using setters during rendering.
suggested solution: add to "encode" function on BarChartSeries (which renders the element) a check for x and y axes.
added code is highlighted.
public void encode(Writer writer) throws IOException {
AxisType xaxis = this.getXaxis();
AxisType yaxis = this.getYaxis();
writer.write("{");
writer.write("label:\"" + ComponentUtils.escapeText(this.getLabel()) + "\"");
writer.write(",renderer: $.jqplot." + this.getRenderer());
if (xaxis != null) {
writer.write(",xaxis:\"" + xaxis + "\"");
}
if (yaxis != null) {
writer.write(",yaxis:\"" + yaxis + "\"");
}
if (this.disableStack) {
writer.write(",disableStack:true");
}
writer.write("}");
}
OK this is great. Can you open an issue with all the details here: https://github.com/primefaces/primefaces/issues
Then I will create a patch with your fixes for review.
Then I will create a patch with your fixes for review.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 26 guests