Dear Apache ECharts Developers,

I hope this message finds you well.

I am writing to introduce a new project currently under development, called
"Apache ECharts From Mermaid." This project aims to enable Apache ECharts
to render charts using a Mermaid-like syntax. By leveraging this plugin, we
can generate charts from text or markdown, which is especially beneficial
in LLM applications.

The primary advantage of this approach lies in the simplicity of Mermaid
syntax compared to the complex structure of ECharts options. This makes the
chart generation process more reliable and user-friendly. Additionally,
users can customize the appearance of charts using `echarts.registerTheme`.

Here is a brief example of how it works:

```javascript
import { EChartsFromMermaid } from 'echarts-from-mermaid';
import * as echarts from 'echarts';

const mermaidDefinition = `
pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15
`;

const option = EChartsFromMermaid.getOption(mermaidDefinition);
/** which generates the following option:
* {
* title: {
* text: 'Pets adopted by volunteers'
* },
* series: [
* {
* type: 'pie',
* data: [
* { value: 386, name: 'Dogs' },
* { value: 85, name: 'Cats' },
* { value: 15, name: 'Rats' }
* ]
* }
* ]
* }
*/

// This option can be used directly with ECharts.
const chart = echarts.init(document.getElementById('main'));
chart.setOption(option);

Currently, the plugin supports several chart types such as pie, bar, line,
and sankey. We have also extended Mermaid's capability to describe other
chart types supported by Apache ECharts.

As this project is still in its development phase, we would greatly
appreciate your feedback and suggestions to enhance it further. Your input
will be invaluable in ensuring that we create a robust and versatile tool.

There are types supported by Mermaid like Pie, Bar, Line, and Sankey. And I
also plan to extend the Mermaid - like syntax to describe some chart types
that Mermaid doesn't support natively but are supported by Apache ECharts.

I would greatly appreciate it if you could take a look at the project and
share your thoughts, suggestions, or any potential improvements. Your
insights would be extremely valuable as we continue to develop this plugin.

Thank you for your time and consideration. I look forward to hearing your
thoughts.

Best regards,

*Ovilia*

Reply via email to