Dear Metabase Team
I’ve successfully created a new card using your API via POST /api/card/ and the following json string:
json = {
“dataset_query”:
{
“database”: 2,
“native”:
{
“query”: query
},
"type": "native"
},
"display": "table",
"name": "api_test_card",
"collection_id": 59,
"visualization_settings": {}
}
query’s just a string of the form “SELECT * from (VALUES (1, 2, 3, 4, 5), (6, 7, 8, 9, 10)) t (c1, c2, c3, c4, c5);” as I’m still testing.
I’ll get the data displayed in table format, but what I want in the end is a bar chart of the following form:
- c1 as x-axis (timeseries)
- c2, c3, c4 as y-axis
- x-axis named “date”
- y-axis named “USD”
- c2 datapoints colored green
- c3 datapoints colored blue
- c4 datapoints colored red
I’ve searched through your API docs, grepped your source code and also checked the metabase-api package. Unfortunately I couldn’t find the right information. Would you mind giving me a little hint how to figure out the settings? I assume I’ve got to find the appropriate values for key “visualization_settings” in the submitted json?
Your help is very much appreciated.
Thanks,
Raphaela