import { observer } from 'mobx-react-lite'; import { useVizStore } from '../../store'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { Button } from '../ui/button'; import { Dialog, DialogContent } from '../ui/dialog'; export default observer(function ErrorPanel() { const vizStore = useVizStore(); const { t } = useTranslation(); const closeModal = () => { vizStore.updateShowErrorResolutionPanel(0); return; }; switch (vizStore.showErrorResolutionPanel) { case 0: return null; case 500: return (

Oops!

The chart is too large to render. You can try options above:

1. Set the chart to a fixed size. { vizStore.setVisualLayout('size', { mode: 'fixed', width: 800, height: 600 }); closeModal(); }} > Set Now

2. Change to SVG renderer. { vizStore.setVisualLayout('useSvg', true); closeModal(); }} > Set Now

3. Close this modal and edit the chart to reduce chart size.

); case 501: return (

Oops!

There is some error with Computation service. Here is the Error message:

{vizStore.lastErrorMessage}

); case 502: return (

Oops!

There is some error with Askviz service. Here is the Error message:

{vizStore.lastErrorMessage}

); } return null; });