Skip to content

Add charts to dashboards #15

@arieselinger

Description

@arieselinger

Hi, I was wondering if there is a way to add charts to dashboard using the client. I manage to tweak json_metadata in order to change the dashboard layout but I am not able to associate any existing chart. I feel like the added value of the superset client would be to be able to create a complete dashboard from scratch in python. I am also a bit confused by the charts attribute: dashboard.charts returns a list of chart names (string), dashboard.get_charts returns a list of Ids (This is the list I would like to be able to update). Do you have any insight on this? Is any of this related to the following comment?

# Need to find a solution
#
# Due to the design of the superset API,
# get /chart/_info only returns 'slice_name'
# for chart adds to work,
# we require the additional attributes:
# 'datasource_id',
# 'datasource_type'
if self.__class__.__name__ == 'Charts':
self.add_columns = [
'datasource_id',
'datasource_type',
'slice_name',
'params',
'viz_type',
'description'
]

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions