File tree Expand file tree Collapse file tree 2 files changed +22
-24
lines changed
Expand file tree Collapse file tree 2 files changed +22
-24
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ export function ChartVisualization({
3434 toolBox,
3535 chartInfo,
3636 chartRef,
37- hidden = false ,
3837} : ChartVisualizationProps ) {
3938 const theme = useTheme ( ) ;
4039
@@ -73,10 +72,6 @@ export function ChartVisualization({
7372 chartInfo . timeseriesResult . isPending
7473 ) ;
7574
76- if ( hidden ) {
77- return null ;
78- }
79-
8075 if ( chartInfo . timeseriesResult . isPending ) {
8176 if ( previousPlottables . length === 0 ) {
8277 const loadingMessage =
Original file line number Diff line number Diff line change @@ -246,27 +246,30 @@ function Chart({
246246 Title = { Title }
247247 Actions = { Actions }
248248 Visualization = {
249- < ChartVisualization
250- chartInfo = { chartInfo }
251- hidden = { ! visible }
252- chartRef = { chartRef }
253- brush = { boxSelectOptions . brush }
254- onBrushEnd = { boxSelectOptions . onBrushEnd }
255- onBrushStart = { boxSelectOptions . onBrushStart }
256- toolBox = { boxSelectOptions . toolBox }
257- />
249+ visible && (
250+ < ChartVisualization
251+ chartInfo = { chartInfo }
252+ chartRef = { chartRef }
253+ brush = { boxSelectOptions . brush }
254+ onBrushEnd = { boxSelectOptions . onBrushEnd }
255+ onBrushStart = { boxSelectOptions . onBrushStart }
256+ toolBox = { boxSelectOptions . toolBox }
257+ />
258+ )
258259 }
259260 Footer = {
260- < ConfidenceFooter
261- sampleCount = { chartInfo . sampleCount }
262- isLoading = { chartInfo . timeseriesResult ?. isPending || false }
263- isSampled = { chartInfo . isSampled }
264- confidence = { chartInfo . confidence }
265- topEvents = {
266- topEvents ? Math . min ( topEvents , chartInfo . series . length ) : undefined
267- }
268- dataScanned = { chartInfo . dataScanned }
269- />
261+ visible && (
262+ < ConfidenceFooter
263+ sampleCount = { chartInfo . sampleCount }
264+ isLoading = { chartInfo . timeseriesResult ?. isPending || false }
265+ isSampled = { chartInfo . isSampled }
266+ confidence = { chartInfo . confidence }
267+ topEvents = {
268+ topEvents ? Math . min ( topEvents , chartInfo . series . length ) : undefined
269+ }
270+ dataScanned = { chartInfo . dataScanned }
271+ />
272+ )
270273 }
271274 height = { chartHeight }
272275 revealActions = "always"
You can’t perform that action at this time.
0 commit comments