Python openpyxl:如何为axis设置引用

Python openpyxl:如何为axis设置引用,python,openpyxl,Python,Openpyxl,我的任务是使用折线图创建excel文件。因此,我使用openpyxl编写了函数: def _create_chart_for_factor_and_predicted_values(self, sheet, title, legend_name, chart_pos: str, x_axis_scale: tuple,

我的任务是使用
折线图创建excel文件。因此,我使用
openpyxl
编写了函数:

def _create_chart_for_factor_and_predicted_values(self, sheet, title, legend_name, chart_pos: str,
                                                  x_axis_scale: tuple,
                                                  data_reference: Reference):
    chart = LineChart()
    chart.title = title
    chart.style = 14

    chart.x_axis.

    chart.y_axis.title = 'Значения'
    chart.x_axis.title = legend_name

    chart.x_axis.scaling.min = x_axis_scale[0]
    chart.x_axis.scaling.max = x_axis_scale[1]
    chart.x_axis.tickLblPos = "low"

    chart.add_data(data_reference, titles_from_data=True)
我在A3:A32上有“年份”栏。所以我不想使用
chart.x\u axis.scaling.min
chart.x\u axis.scaling.max
。我应该将“年”列设置为
参考
,那么我可以用什么方法来实现呢