Tag: linechart

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

我有这个图表,使用Python包xlsxwriter创build,我想删除中间的所有点,只保留第一个和最后一个。 之前: 最终结果通缉 我尝试了属性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': […]

从数据表OpenXML线图

我正在生成一个基于查询string在网页的页面加载生成的报告。 我的单元格数据完全按照我希望在电子表格中生成的那样生成。 现在我需要添加折线图。 数据是dynamic的,行数有所不同。 在search中没有任何信息,这与在.net中使用openXML线图有关,所以我试图按照条形图示例,它将字典作为数据源,并试图破解这一点,以便从一个dataTable。 线图出现在我想要的工作表中,并且正在添加基于datatable的column1的系列。 我希望每个点都基于第2到第13列,但是我只得到第13列,并且不添加点名称。 老实说,我讨厌Excel和电子表格,对它们知之甚less,几乎没有时间去学习。 这是我尝试添加数据的代码: For i As UInteger = 0UI To CUInt(dataTable.Rows.Count – 2) Dim seriesName As String = dataTable.Rows(CInt(i))(dataTable.Columns(CInt(0)).ColumnName).ToString() Dim lineChartSeries As LineChartSeries lineChartSeries = lineChart.AppendChild(New LineChartSeries(New Index() With {.Val = New UInt32Value(i)}, New Order() With {.Val = New UInt32Value(i)}, New SeriesText(New NumericValue() With {.Text = seriesName}))) For j […]

使用C#.net(Microsoft.Office.Interop.Excel)在Excel中删除LineChart中的网格线

我在使用C#.Net MVC与DLL( Microsoft.Office.Interop.Excel )删除/隐藏在Excel表格中的网格线的问题我想删除它或只是隐藏,因为这是客户端的需要。 我见过很多文章,但仍然不适合我。 请点击这里查看我的示例excel 图像中的3个数字是我想要移除或隐藏的东西。 这里是我的代码边框,ChartArea和PlotArea透明度。 //Plot Area chartPage.PlotArea.Format.Fill.Solid(); chartPage.PlotArea.Format.Fill.ForeColor.RGB = (int)XlRgbColor.rgbWhite; chartPage.PlotArea.Format.Fill.Transparency = (float)1; //Chart Area chartPage.ChartArea.Format.Fill.Solid(); chartPage.ChartArea.Format.Fill.ForeColor.RGB = (int)XlRgbColor.rgbWhite; chartPage.ChartArea.Format.Fill.Transparency = (float)1; //Border chartPage.ChartArea.Format.Line.ForeColor.RGB = (int)XlRgbColor.rgbWhite; chartPage.ChartArea.Format.Line.Transparency = (float)1; 我的问题是网格线,请参考图像。 任何帮助,将不胜感激。 谢谢!