The Spanish Statistical Office (INE) has an API that follows the arrobj pattern (an array of objects for data), meaning: it can be converted to JSON-stat with fromTable(). The data is visualized with ChartJS.
This conversion is not strictly necessary because INE also supports JSON-stat. For an example using INE's JSON-stat API see Latest unemployment rate in Spain.