Hi June,
Thanks for contacting Syncfusion support.
We have analyzed your query. Currently axis title can’t be moved as shown in the screenshot. However, your requirement can be achieved as workaround using annotation feature. In this we can place the required text anywhere in chart. In order to place the text anywhere, specify coordinateUnit as pixels of annotations property, also x and y values can be specified dynamically using chartAreaBoundsCalculate event as depicted in the below code snippet.
JS:
div id= "yTitle" style="display:none">weight</div>
<div id= "xTitle" style="display:none">date</div>
$("#container").ejChart(
{
//...
annotations: [
{ visible: true, content: "yTitle", coordinateUnit: "pixels", horizontalAlignment: "right" },
{ visible: true, content: "xTitle", coordinateUnit: "pixels", horizontalAlignment: "right" }
],
chartAreaBoundsCalculate: "chartLoaded"
});
function chartLoaded(sender) {
var bound = sender.model.m_AreaBounds;
padding = 10;
sender.model.annotations[0].x = bound.X - padding;
sender.model.annotations[0].y = bound.Y - padding;
sender.model.annotations[1].x = bound.X + bound.Width + padding;
sender.model.annotations[1].y = (bound.Y + (bound.Height / 2));
} |
Screenshot:
Sample for reference can be find from below link.
Kindly revert us, if you have any concern.
Thanks,
Dharani.