使用python包xlsxwriter从excel文件折线图中删除点

时间:2014-04-01 15:03:54

标签: python excel linechart points xlsxwriter

我有这个图表,使用python包xlsxwriter创建,我想删除中间的所有点,只保留第一个和最后一个。 之前: enter ima ge description here最终结果需要。:

enter image description here

我尝试了属性points,但不幸的是,它对我不起作用。

line_chart.add_series(
                        {
                            'values': '='+worksheet_name+'!$C$'+str(row_range+1)+':$I'+str(row_range+1),
                            'marker': {'type': 'diamond'},
                            'data_labels': {'value': True, 'category': True, 'position': 'center', 'leader_lines': True},

                            'points': [
                                    {'fill': {'color': 'green'}},
                                    None,
                                    None,
                                    None,
                                    None,
                                    None,
                                    {'fill': {'color': 'red'}}
                                ],
                            'trendline': {
                                        'type': 'polynomial',
                                        'name': 'My trend name',
                                        'order': 2,
                                        'forward': 0.5,
                                        'backward': 0.5,
                                        'line': {
                                                'color': 'red',
                                                'width': 1,
                                                'dash_type': 'long_dash'
                                               }
                                        }

                        }
                    ) 

我也尝试过:

line_chart.set_x_axis({
                'major_gridlines': {'visible': False},
                'minor_gridlines': {'visible': False}
                'delete_series': [1, 6]
                })
没有运气。
有人可以帮我吗?

提前致谢!

0 个答案:

没有答案