Open LogOpsBolivar01 opened 2 years ago
I am trying to change color in scatter plot as it can be done in other charts:
chart_data = pptx.chart.data.XyChartData()
series_1 = chart_data.add_series('A') series_1.add_data_point(0.7, 2.7) series_1.add_data_point(1.8, 3.2) series_1.add_data_point(2.6, 0.8)
series_2 = chart_data.add_series('B') series_2.add_data_point(1.3, 3.7) series_2.add_data_point(2.7, 2.3) series_2.add_data_point(1.6, 1.8)
chart = slide.shapes.add_chart( XL_CHART_TYPE.XY_SCATTER, Inches(0.1), Inches(0.3), Inches(4), Inches(4), chart_data ).chart
for point in chart.series[0].points: fill = point.format.fill #fill the legend as well fill.solid() fill.fore_color.rgb = RGBColor.from_string('016D38')
But, instead of colouring the points, it draws a line:
¿How can I change the color of the points?
I got the same problem, haven't found out how to color them yet
Unfortunately, I have not found a solution.
I am trying to change color in scatter plot as it can be done in other charts:
chart_data = pptx.chart.data.XyChartData()
series_1 = chart_data.add_series('A') series_1.add_data_point(0.7, 2.7) series_1.add_data_point(1.8, 3.2) series_1.add_data_point(2.6, 0.8)
series_2 = chart_data.add_series('B') series_2.add_data_point(1.3, 3.7) series_2.add_data_point(2.7, 2.3) series_2.add_data_point(1.6, 1.8)
chart = slide.shapes.add_chart( XL_CHART_TYPE.XY_SCATTER, Inches(0.1), Inches(0.3), Inches(4), Inches(4), chart_data ).chart
for point in chart.series[0].points: fill = point.format.fill #fill the legend as well fill.solid() fill.fore_color.rgb = RGBColor.from_string('016D38')
But, instead of colouring the points, it draws a line:
¿How can I change the color of the points?