JonghoKim
JonghoKim

Reputation: 1995

how to draw line chart with date fomat on excel using openpyxl of python

I draw a line chart on excel using openpyxl

In excel sheet:

     date     value
"2015-05-01" | 0.1
"2015-05-02" | 0.2
"2015-05-03" | 0.3
"2015-05-04" | 0.4

But it gives integer format for date data like "45612"... How could I draw line chart with date format? (date is x-axis, and value is y-axis)

Upvotes: 0

Views: 957

Answers (1)

Charlie Clark
Charlie Clark

Reputation: 19497

Use something like this: chart.x_axis.number_format = 'yyyy-mm-dd'

Upvotes: 1

Related Questions