The time format is incorrect in a chart

image.png (5.4 KB)
以上为原格式
image.png (14.4 KB)
这个是截图效果,横坐标为时间

@DRzeng88,
Thank you for the screenshots. Could you please share the presentation files and a simple standalone project reproducing the problem?

图表效果.zip (44.9 KB)
Uploading: 图表效果.zip…

public static String buildImageByShape(PPTInfo info, IShape shape, String id) throws Exception {
    String path = PPT_RESOURCE_LOCAL_PATH + File.separator + id + IMG_PNG_SUFFIX;
    File file = new File(path);
    if (!file.getParentFile().exists()) {
        file.getParentFile().mkdirs();
    }
    BufferedImage coverImg = shape.getThumbnail();
    ImageIO.write(coverImg, IMG_PNG_FORMAT, file);
    return path;
}

public Item buildImage(PPTInfo info, IPictureFrame pictureFrame, int deepIndex) throws Exception {
    Item item = new Item();
    String filePath = PPTFileUtil.buildImageByShape(info, pictureFrame, item.getId());
}

private void buildPageItems(PPTInfo info, IShapeCollection shapes, List<Item> itemList, int deepIndex) throws Exception {
    if (shape instanceof IChart) {
				IChart chart = (IChart) shape;
				chart.getChartDataTable().getFormat().getEffect();
				Item item = itemBuilder.buildItemImageByShape(info, shape, deepIndex);
				itemList.add(item);
			} 

以上是演示文稿及这个功能涉及到的逻辑代码,期待您图表效果.zip (44.9 KB)
的最佳答案

@DRzeng88,
Thank you for the code example and presentation file. I reproduced the problem and received the same results. I have logged the issue in our tracking system with ID SLIDESJAVA-38476 for further investigation. You will be notified when it is fixed.

The issues you have found earlier (filed as SLIDESJAVA-38476) have been fixed in this update.