Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c1 = LineChart()
- c1.title = "SLA Discharge - 5.5A: V_BAT"
- c1.style = 12
- c1.y_axis.crossAx = 500
- c1.x_axis = DateAxis(crossAx=100)
- c1.x_axis.number_format = 'd-HH-MM-SS'
- c1.x_axis.majorTimeUnit = "days"
- c1.y_axis.title = "Battery Voltage"
- c1.x_axis.title = "Time"
- data = Reference(ws2, min_col=2, min_row=1, max_col=2, max_row=sheet.max_row)
- c1.add_data(data, titles_from_data=True)
- dates = Reference(ws2, min_col=1, min_row=2, max_row=sheet.max_row)
- c1.set_categories(dates)
- c2 = LineChart()
- data2 = Reference(ws2, min_col=3, min_row=1, max_col=3)
- c2.add_data(data2, titles_from_data=True, from_rows=True)
- c2.y_axis.axId = 200
- c2.y_axis.title = "Qbat Percentage"
- c1.y_axis.crosses = "max"
- c1 += c2
- s1 = c1.series[0]
- s1.graphicalProperties.line.solidFill = "BE4B48"
- s1.graphicalProperties.line.width = 25000 # width in EMUs.
- s1.smooth = True # Make the line smooth
- ws2.add_chart(c1, "D5")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement