[英]How to apply SVG and font filters to amcharts4?
我正在嘗試將過濾器應用於我的JS對象,其中<%=strKey%>
是動態腳本化的對象名稱,因此,每次迭代時,名稱都會更改。
// dynamically writing JS - key value is the chart name
var <%=strKey%> = am4core.create("<%=strKey%>", am4charts.GaugeChart); // has to mach the HTML IDs
<%=strKey%>.innerRadius = am4core.percent(82); // innerRadius begins at 82%, leaving white-space inside the gauge
該文檔僅列出JSON格式。 我如何將其應用到我的實施中?
我實際上是想讓陰影出現在半圓規下。 建議好嗎?
您可以使用DropShadowFilter為圖表添加陰影:
chart.filters.push(new am4core.DropShadowFilter());
您可以使用blur
, dx
和dy
來自定義陰影:
var shadow = new am4core.DropShadowFilter();
shadow.blur = 3.5;
shadow.dx = 5;
shadow.dy = 7;
chart.filters.push(shadow);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.