Closed bischoffdev closed 5 years ago
You would have to extend the XAxis and YAxis class to add this functionality.
import be.ceau.chart.options.scales.ScaleLabel; import be.ceau.chart.options.scales.XAxis; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonInclude;
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonAutoDetect( fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE ) public class ChartXAxis extends XAxis { private ScaleLabel scaleLabel;
public ScaleLabel getScaleLabel() {
return this.scaleLabel;
}
public XAxis setScaleLabel(ScaleLabel scaleLabel) {
this.scaleLabel = scaleLabel;
return super.setDisplay(true);
}
}
Do the same for YAxis and you'll be able to add the scale label
Hi, thanks for your answer. However, I wrote my own charting library in the meantime so this is not required anymore.
I just hit the same issue, so I would ask for this to be added to this library :-)
In char.js, setting individual labels on each axis is possible. However, I could not find a way to do that in your library.
Am I overseeing something?
Best, Benjamin