My goal is to create a chart in a sheet from XlsxWriter without having the data from the chart available anywhere on the sheet (I don't want to reference cells). For legal reasons the data cannot be available in the book.
Alternatively, if there's a way to write data to cells, graph that data, and then remove the cell references so I can have a graph that isn't referencing cells, I would be open to that as well. I know there are some ways to accomplish this in excel.
I have tried replacing the 'categories' and 'values' arguments with lists of integers (data I want graphed) but I get an error for a lack of cell references. (See function below).
# Builds a chart with top left corner at row_start, col_start (zero
# indexed).
# data[data_input[i][0]]['history'][0] is a list of dates.
# data[data_input[i][0]]['history'][1] is a list of values for those dates.
chart = workbook.add_chart({'type': 'line'})
for i in range(len(data_input)):
chart.add_series({
'name': title,
'categories': data[data_input[i][0]]['history'][0],
'values': data[data_input[i][0]]['history'][1],
'line': {'color': colors[i], 'width': 1}
})
worksheet.insert_chart(row_start, col_start, chart)
TypeError: xl_range_formula() takes 5 positional arguments but 261 were given