amis icon indicating copy to clipboard operation
amis copied to clipboard

求问,grid布局下的echart饼状图,为什么在type:"chart"下添加height,width都无法调整其高度和宽度呢!

Open JayHandsome opened this issue 6 years ago • 3 comments

实现场景:

请简单描述你想要实现的原始场景,例如:我想要实现xxx的功能...

存在的问题:

请简单描述你现在遇到的不符合预期的问题...

当前方案:

请粘贴你当前方案的完整 amis schema 代码...

code here...

JayHandsome avatar Sep 12 '20 10:09 JayHandsome

贴代码

RickCole21 avatar Sep 14 '20 02:09 RickCole21

贴代码

{ "type": "page", "body": [ { "type": "panel", "body":{ "type": "grid", "columns": [ { "type": "chart", "api":"对应的json" "name": "status_chart", "style":{ "height":"50px" }, "xs": 5

            }
			]
		}
        
    }
]

} api对应的json { "data"{ "legend":{ "orient":"vertical", "top":"10%", "left":"75%", "data":[ "A","B" ] }, "series":{ "data":[{ "name": "A", "itemstyle":{"color":"#dddddd"}, "value":3 }, { "name": "B", "itemstyle":{"color":"#c23531"}, "value":4 } ], "left": "50%", "bottom":"20%", "name":"Status", "label":{"show":false}, "type":"pie", "radius":["20%","30%"] }, "tooltip":{ "formatter":"{a}
{b}:{c} ({d}%)", "trigger":"item" }, "title":{ "text":"XXX", "textStyle":{ "fontFamily":"monospace", "fontSize":"18" } } } }

JayHandsome avatar Sep 14 '20 06:09 JayHandsome

目前宽高最小写死为300px

RickCole21 avatar Sep 14 '20 10:09 RickCole21