Home › forums › Chart Support › How do I center or Left/Right justify a Label
Tagged: label align
How do I center or Left/Right justify a Label? Is there a way to do this? When a label wraps to more than one line, it defaults to being left justified. It would look much better Centered for vertical bar charts and Right justified for horizontal bar charts. Is there a way to do this? Having labelAlign for AxisX & AxisY seems to be a way to solve this.
To clarify the issue some more — the label I need to right justify is inside DataPoints. The long labels wrap and we need them to be right justified to fit up against the horizontal bars.
data: [{ type: “bar”, dataPoints: [{ x: 0, y: 71, label: “test test test test test test test test test test test test test test” }, { x: 1, y: 55, label: “test test test test” }, ] }]
@gregs,
Aligning axis label is not available as of now. We will re-consider this behavior in future releases.
— Vishwas R Team CanvasJS
Is there another way to have text (instead of values) for the X-Axis? Label inside the DataPoints is the best way to do this? If so, would paying for priority support possibly get this “label align” feature added? Thanks!
Is there another way to have text (instead of values) for the X-Axis?
You can use label to show text in axisX, please refer documentation for more info along with live example.
Label inside the DataPoints is the best way to do this?
Axis labels are shown at every interval whereas you can use indexLabel to show text / info regarding a dataPoint.
would paying for priority support possibly get this “label align” feature added?
Please contact sales[at]canvasjs[dot]com for more sales related information.
You must be logged in to reply to this topic.