mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(chart): rendering standalone chart and errors (#12179)
This commit is contained in:
@@ -172,9 +172,8 @@ const ExploreChartPanel = props => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ParentSize>
|
<ParentSize>
|
||||||
{({ width, height }) =>
|
{({ width }) =>
|
||||||
width > 0 &&
|
width > 0 && (
|
||||||
height > 0 && (
|
|
||||||
<ChartContainer
|
<ChartContainer
|
||||||
width={Math.floor(width)}
|
width={Math.floor(width)}
|
||||||
height={chartSectionHeight}
|
height={chartSectionHeight}
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ import {
|
|||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
...ExploreChartPanel.propTypes,
|
...ExploreChartPanel.propTypes,
|
||||||
|
height: PropTypes.string,
|
||||||
|
width: PropTypes.string,
|
||||||
actions: PropTypes.object.isRequired,
|
actions: PropTypes.object.isRequired,
|
||||||
datasource_type: PropTypes.string.isRequired,
|
datasource_type: PropTypes.string.isRequired,
|
||||||
dashboardId: PropTypes.number,
|
dashboardId: PropTypes.number,
|
||||||
|
|||||||
@@ -97,7 +97,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% block tail_js %}
|
{% block tail_js %}
|
||||||
{{ js_bundle('menu') }}
|
{% if not standalone_mode %}
|
||||||
|
{{ js_bundle('menu') }}
|
||||||
|
{% endif %}
|
||||||
{% if entry %}
|
{% if entry %}
|
||||||
{{ js_bundle(entry) }}
|
{{ js_bundle(entry) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user