thalmis-zt opened a new issue, #31937:
URL: https://github.com/apache/superset/issues/31937
### Bug description
I want to apply filters on the chart by passing the filters in the url as
params. This is how I am doing it
<script>
const supersetHost = 'http://localhost:8088';
const tableSliceId = 671;
const formData = {
slice_id: tableSliceId,
adhoc_filters: [
{
clause: 'WHERE',
expressionType: 'SIMPLE',
subject: 'state',
operator: 'IN',
comparator: '247'
}
],
standalone: 1
};
// Stringify and encode the form data
const encodedFormDataFive =
encodeURIComponent(JSON.stringify(formData));
const url =
`${supersetHost}/superset/explore/?form_data=${encodedFormData}&slice_id=${tableSliceId}&standalone=1&height=400`;
</script>
<iframe
width="600"
height="400"
seamless
frameBorder="0"
scrolling="no"
title="with embedding charts enabled"
src={url}
>
</iframe>
### Screenshots/recordings
**Expected** chart

**What I am seeing**

### Superset version
4.0.2
### Python version
3.10
### Node version
18 or greater
### Browser
Chrome
### Additional context
The feature flags are
FEATURE_FLAGS = {"ALERT_REPORTS": True, "EMBEDDED_SUPERSET": True,
"EMBEDDABLE_CHARTS": True, "ALLOW_ADHOC_SUBQUERY": True}
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [ ] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]