You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by 吴 ٚٚ <dr...@hotmail.com> on 2021/11/13 08:12:35 UTC

我用net5的blazor基于标签模式封装了echarts

区别与其他框架封装的echarts,我看都是只有最顶层一层标签,然后完全套用echarts的配置,我是把所有echarts的配置转换成了标签加属性,像下面这样:

<ECharts Style="width: 800px; height: 400px;">

    <Title text="ECharts 入门示例"></Title>

    <Legend data="@(new[] { "销量" })"></Legend>

    <Tooltip></Tooltip>

    <XAxis>

        @foreach (var item in new[] { "衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子" })

        {

            <Data value="@item">

                <TextStyle color="red"></TextStyle>

            </Data>

        }

    </XAxis>

    <YAxis>

        <AxisLabel formatter="(value, index) => {return value + ':';}"></AxisLabel>

    </YAxis>

    <Series name="销量" type="bar" data="@(new[] { 5, 20, 36, 10, 10, 20 })">

    </Series>

</ECharts>

目前我也不是太清楚这种方案和传统的属性方案哪种好,只是多一个技术方案的尝试,而且还有很大改造空间,下面是github的地址:

https://github.com/draculakkk/TagEChartsBlazor


从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送


Re: 我用net5的blazor基于标签模式封装了echarts

Posted by Ovilia <ov...@gmail.com>.
Hi Binbin,

Thanks for making a plugin for Apache ECharts. We would appreciate English
emails
in our mailing list for more people to understand.

Could you please help change "ECharts" into "Apache ECharts" in your repo's
readme?
That would help a lot for our branding.

The community has an unofficial list of awesome projects related to Apache
ECharts.
See if you wish to add your repo to
https://github.com/ecomfe/awesome-echarts#net .
You are welcome to make a PR.

Thanks

*Ovilia*


On Sat, Nov 13, 2021 at 11:20 PM 吴 贇贇 <dr...@hotmail.com> wrote:

>
>
> 区别与其他框架封装的echarts,我看都是只有最顶层一层标签,然后完全套用echarts的配置,我是把所有echarts的配置转换成了标签加属性,像下面这样:
>
> <ECharts Style="width: 800px; height: 400px;">
>
>     <Title text="ECharts 入门示例"></Title>
>
>     <Legend data="@(new[] { "销量" })"></Legend>
>
>     <Tooltip></Tooltip>
>
>     <XAxis>
>
>         @foreach (var item in new[] { "衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋",
> "袜子" })
>
>         {
>
>             <Data value="@item">
>
>                 <TextStyle color="red"></TextStyle>
>
>             </Data>
>
>         }
>
>     </XAxis>
>
>     <YAxis>
>
>         <AxisLabel formatter="(value, index) => {return value +
> ':';}"></AxisLabel>
>
>     </YAxis>
>
>     <Series name="销量" type="bar" data="@(new[] { 5, 20, 36, 10, 10, 20 })">
>
>     </Series>
>
> </ECharts>
>
> 目前我也不是太清楚这种方案和传统的属性方案哪种好,只是多一个技术方案的尝试,而且还有很大改造空间,下面是github的地址:
>
> https://github.com/draculakkk/TagEChartsBlazor
>
>
> 从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送
>
>