I cant render charts
Closed this issue · 3 comments
omar2205 commented
This is my React code:
import { markedUiExtension } from "@markdown-ui/marked-ext";
import { MarkdownUI } from "@markdown-ui/react";
import "@markdown-ui/react/widgets.css";
import { Marked } from "marked";
const marked = new Marked();
marked.use(markedUiExtension);
export default function App() {
const exampleMarkdown = `# React Implementation
This demo runs using **@markdown-ui/react**:
\`\`\`markdown-ui-widget
button-group react-choice [Hooks Context Redux] Hooks
\`\`\`
\`\`\`markdown-ui-widget
select react-version [16 17 18 19] 18
\`\`\`
\`\`\`markdown-ui-widget
slider react-components 1 50 1 12
\`\`\`
\`\`\`markdown-ui-widget
chart-bar
title: Monthly Fruit Sales
height: 300
Month,Apples,Oranges,Bananas
Jan,30,20,25
Feb,25,30,20
Mar,35,25,30
Apr,40,35,45
May,45,40,50
\`\`\`
`;
const renderedHtml = marked.parse(exampleMarkdown);
return <MarkdownUI html={renderedHtml} />;
}It's being rendered as:

yail259 commented
Chart support was just added in the newest minor version bump, please check that @markdown-ui/marked-ext and @markdown-ui/react are up to date.
omar2205 commented
What version? I have ^0.2.0
omar2205 commented
Works perfectly! Thanks