Open hendralinux opened 3 weeks ago
@hendralinux: sorry but I cannot reproduce your issue. Could you provide a minimal reproducible sample (metadata.yml, html template) for the issue you are experiencing?
FYI, I tried to reproduce the issue with a minimal example:
For instance here is a basic dashboard without any filters containing a single chart:
datasette-dashboards:
test-dashboard:
title: Test Dashboard
description: Some description
charts:
test-chart:
title: Total number of offers
db: jobs
query: >-
SELECT count(*) as count
FROM offers_view
library: metric
display:
field: count
prefix:
suffix: " offers"
And then in a HTML template, an iframe to embedded the chart:
<iframe
src="/-/dashboards/test-dashboard/test-chart/embed"
frameborder="0"
width="100%"
height="600"
allowtransparency
>
</iframe>
This is working well on my end, without any 404 errors.
I created a dashboard without the need for any filter, however it seems like the url to be used as src in iframe requires a filter as in ../chart-name/embed?filter_name=value coz simply using ../chart-name/embed or even ./chart-name/embed?dummy returns 404 error.
From sample metadata: