google-chart
google-chart copied to clipboard
Allow for comma in last row of data
Process data with comma on the last row of data so dont have to do specific logic to identify last row for bar charts I am using it inside a lit component
data='[["Month", "Days"], ["Jan", 31],["Feb", 28]]' --- works data='[["Month", "Days"], ["Jan", 31],["Feb", 28],]' --- fails
The component uses JSON.parse which does not accept trailing commas. Providing a custom parser would be fairly complex and could increase the code size significantly.
I am using it inside a lit component
In that case, the input can use a property binding and pass the array object without serialization.
<google-chart .data="${this.inputArray}"></google-chart>