Hello,
Thanks for your inquiry and below are my answers to your questions.
1. As for the "labels overlap" issue, I did an initial test with the latest
Spire.XLS Pack(Hotfix) Version:9.5.11 but didn't reproduce your issue. Thus, I suggest you try again with the latest version, you also can try with the following code to set a smaller size font or specify a position for the series labels. If your issue still occurs after trying, to help further look into it, please share us with your full testing code, you input file (if any) as well as your generated excel file. You could send them to us via email (
support@e-iceblue.com).
- Code: Select all
......
//set a smaller size font
cs1.DataPoints.DefaultDataPoint.DataLabels.Font.Size = 8;
//specify a position
cs1.DataPoints.DefaultDataPoint.DataLabels.X = 150;
cs1.DataPoints.DefaultDataPoint.DataLabels.Y = 50;
......
2. You can refer to the following code snippet to increase columns width.
- Code: Select all
......
cs1.Format.Options.GapWidth = 20;
......
3. Since our Spire.XLS is based on MS Excel, when positioning the series labels of ColumnClustered chart, the DataLabelPositionType should follow as the same types in MS Excel. The attached screenshot shows that there are four position types for series labels of ColumnClustered chart in MS Excel. Therefore, Please try to test with the following code snippet. If this effect is not what you want, please provide your desired effect with us, then we will look into it and guide you accordingly.
- Code: Select all
cs1.DataPoints.DefaultDataPoint.DataLabels.Position = Spire.Xls.DataLabelPositionType.Outside;
cs2.DataPoints.DefaultDataPoint.DataLabels.Position = Spire.Xls.DataLabelPositionType.OutsideBase;
Sincerely,
Lisa
E-icbelue support team