fix(chart): rendering standalone chart and errors (#12179)
This commit is contained in:
parent
93af329078
commit
4ac00a0954
|
|
@ -172,9 +172,8 @@ const ExploreChartPanel = props => {
|
|||
|
||||
return (
|
||||
<ParentSize>
|
||||
{({ width, height }) =>
|
||||
width > 0 &&
|
||||
height > 0 && (
|
||||
{({ width }) =>
|
||||
width > 0 && (
|
||||
<ChartContainer
|
||||
width={Math.floor(width)}
|
||||
height={chartSectionHeight}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ import {
|
|||
|
||||
const propTypes = {
|
||||
...ExploreChartPanel.propTypes,
|
||||
height: PropTypes.string,
|
||||
width: PropTypes.string,
|
||||
actions: PropTypes.object.isRequired,
|
||||
datasource_type: PropTypes.string.isRequired,
|
||||
dashboardId: PropTypes.number,
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@
|
|||
</div>
|
||||
|
||||
{% block tail_js %}
|
||||
{{ js_bundle('menu') }}
|
||||
{% if not standalone_mode %}
|
||||
{{ js_bundle('menu') }}
|
||||
{% endif %}
|
||||
{% if entry %}
|
||||
{{ js_bundle(entry) }}
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Reference in New Issue