PptxGenJS icon indicating copy to clipboard operation
PptxGenJS copied to clipboard

[BUG]As soon as the composite chart is used, the repair will pop up when opening the PPT with office

Open Macxx-could opened this issue 1 year ago • 4 comments

Issue Category

  • [ ] Enhancement
  • [x] Bug
  • [ ] Question
  • [ ] Documentation gap/issue

Product Versions

  • Please specify what version of the library you are using......: [ v3.11.0 ]
  • Please specify what version(s) of PowerPoint you are targeting: [ 2021 && office365 ]
  • Please specify what web browser you are using.................: [ ]

Desired Behavior

  1. Open PPT normally without any pop-up box
  2. Composite charts display normally

Observed Behavior

Pop-up repair when opening PPT 25A68C38-9B73-445C-8A32-B5805041D9D3 Click Repair, enter the PPT, the page with the chart becomes a blank page 8024D6DB-0759-40BB-9E65-E31645CF94F9 If the code related to the chart is commented, this problem will not occur

Note that not all composite charts will have this problem, and composite charts on some pages can be displayed normally

Steps to Reproduce

    const leftTypes = [
        {
            "type": "bar",
            "data": [
                {
                    "name": "权责使用率",
                    "labels": ["数字化", "公共", "营销管理", "合同与付款", "产品设计", "成本管理", "费用报销", "招采管理", "人力资源", "财务金融", "行政办公", "客户关系", "运营管理", "工程管理", "安全", "物业管理"],
                    "values": ["100", "100", "90.9", "80.6", "75", "73.3", "66.7", "64.2", "61.5", "57.1", "53.8", "33.3", "26.7", "16.7", "16.7", "0"]
                }
            ],
            "options": {
                "chartColors": [
                    "599ad5"
                ],
                "barGrouping": "stacked",
                "showValue": true,
                "showLabel": true,
                "barGapWidthPct": 250
            }
        },
        {
            "type": "line",
            "data": [
                {
                    "name": "23年非标使用率",
                    "labels": ["数字化", "公共", "营销管理", "合同与付款", "产品设计", "成本管理", "费用报销", "招采管理", "人力资源", "财务金融", "行政办公", "客户关系", "运营管理", "工程管理", "安全", "物业管理"],
                    "values": ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"]
                }
            ],
            "options": {
                "chartColors": [
                    "ffc000"
                ],
                "secondaryValAxis": true,
                "secondaryCatAxis": true,
                "showValue": true,
                "showLabel": true,
                "lineDataSymbolSize": 1
            }
        }
    ]
const props ={
    "x": 2.066928675,
    "y": 1.476377625,
    "w": 11.059052663000001,
    "h": 2.685038774,
    "chartArea": {
        "fill": {
            "color": "ffffff"
        }
    },
    "barDir": "col",
    "barGrouping": "stacked",
    "dataLabelPosition": "t",
    "dataLabelFormatCode": "0.0\"%\"",
    "dataLabelFontFace": "微软雅黑",
    "dataLabelFontSize": 8,
    "catAxisLabelColor": "494949",
    "catAxisLabelFontFace": "微软雅黑",
    "catAxisLabelFontSize": 8,
    "catAxisLabelRotate": 0,
    "showLegend": true,
    "legendPos": "b",
    "showTitle": true,
    "titleFontFace": "微软雅黑",
    "titleFontSize": 12,
    "title": "华东区域公司权责使用率(累计23年)",
    "valAxes": [
        {
            "showValAxisTitle": false,
            "valAxisHidden": true,
            "valAxisLineShow": false,
            "valGridLine": {
                "style": "none"
            }
        },
        {
            "showValAxisTitle": false,
            "valAxisHidden": true,
            "valAxisLineShow": false,
            "valGridLine": {
                "style": "none"
            }
        }
    ],
    "catAxes": [
        {
            "catAxisTitle": "Year"
        },
        {
            "catAxisHidden": true
        }
    ]
}
slide.addChart(leftTypes, {
        ...props,
        title: `地产权责使用率(累计2022年)`,
    });

Macxx-could avatar Mar 20 '23 10:03 Macxx-could