-
Could not render chart
-
{error}
+
+
+
+ {view === 'preview' ? (
+
+ {renderError ? (
+
Could not render chart{renderError}
+ ) : render ? (
+
+ ) : (
+
{validation.valid ? 'Rendering chart...' : 'Fix the chart specification to preview it.'}
+ )}
- ) : render ? (
-
) : (
- Rendering…
+
+ {JSON.stringify(render?.vlSpec ?? (validation.valid ? {} : validation), null, 2)}
+
)}
+
+ {isEditing && }
+
- {warnings.length > 0 && (
-
- {warnings.map((w, i) => (
- -
- {w.severity} {w.message}
-
- ))}
-
- )}
-
}
);
}
@@ -384,35 +440,22 @@ export function FlintAppInner(props: {
export function FlintApp() {
const [input, setInput] = useState