python-pptx-无法更新一个数据点的datalabel文本

我正在尝试更新1个特定数据标签的文本,但是它关闭了其兄弟姐妹的数据标签。

<?xml version="1.0"?>
<psalm
    errorLevel="4"
    resolveFromConfigFile="true"
    totallyTyped="true"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="https://getpsalm.org/schema/config"
    xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
    <projectFiles>
        <directory name="src" />
        <ignoreFiles>
            <file name="src/Kernel.php"/>
            <directory name="vendor" />
        </ignoreFiles>
    </projectFiles>
</psalm>

它就是这样做的,请注意,#turn on data labels plot = chart.plots[0] plot.has_data_labels = True #add custom text to the 1st series' 1st data point. Ignore the rest. plot.series[1].points[1].data_label.text_frame.text = '▲' plot.series[1].points[0]的数据标签现在已关闭。

enter image description here

预期输出:

enter image description here

相关文章

本文适合有 Python 基础的小伙伴进阶学习 作者:pwwang 一、...
前言 目前有个python应用需要在容器镜像内拉取git私有仓库的...
前言 当网络不稳定或应用页面加载有问题,可以设置等待,避免...
前言 map()、reduce()、filter()是python的三个高阶函数。所...
入门使用 # 示例代码 warframe = [&quot;saryn&quot...
前言 功能描述:批量重命名指定目录下的文件,文件名加前缀,...