Free Support Forum -

Scatter Chart Label Override issue



We are generating normal Scatter Chart with Diamond as a marker.
In some cases we are having datapoint very close to each other so in this situation datalabel are getting overlapped.
Is there any way to find out if datapoints are overriden or not ?

ThanksScatter-Datapoint-Overriding-Issue.PNG (3.5 KB)


I have observed the requirements shared by you and like to mention that there is no direct or authentic approach to identify the overlapping labels. However, there are X,Y properties representing the position of Datalable.You may try comparing the X,Y values of two labels with some offset difference to see if they are overlapping or not. This approach may work on your end.

Hi ,


We are using Aspose 16.8.0 Java . In this while getting X and Y values of datalabel getting 0.0.



we are always getting 0.0 .


0,0 for X,Y is returned in case when automatic label position is used. If you set the position label manually, you will have X,Y values.



I am unable to get it the X and Y values.
Can you please help me by providing sample code for what i have to set initially and what value of X and Y i will get then.

Thank you.


I suggest you to please consider using following sample code on your end to get an idea about setting label positions.

public static void TestLabelPosition()
    Presentation pres = new Presentation();

    IChart chart =pres.getSlides().get_Item(0).getShapes().addChart(ChartType.ClusteredColumn,20,20,400,400);
    //Top right position

    //Actual Label position on desired label

    //Bottom Right
    chart.getChartData().getSeries().get_Item(0).getDataPoints().get_Item(2).getLabel().setY(1);"C:\\Aspose Data\\LabelPostions2.pptx", SaveFormat.Pptx);


I hope the share information will be helpful.



Thanks for your response.

The code which you have provided is for placing the data labels at different position.
But we are searching that , is there any way to find out that the two data labels are overriding or not ?



I have observed your requirements and suggest you to please explore the options of label widths and heights and calculating if that is intersecting with other label somehow or not. There is no API feature to detect this by you may use these properties to develop your own approach to find overlapping labels on your end.