SAP UI5 - 根据度量将自定义颜色添加到SAP Viz图表线图?

问题描述 投票:0回答:1

访问有关Viz文档的网站https://sapui5.hana.ondemand.com/docs/vizdocs/index.html

PFB解决方案。

sapui5
1个回答
0
投票
var oVizFrame = new sap.viz.ui5.controls.VizFrame(this._constants.vizFrames.config);

oVizFrame.setVizProperties({
  plotArea: {
    line: {
      lineRenderer: function(oevent) {
        if (oevent.ctx.measureNames === "Capacity_Utilization_Percent") {
          oevent.graphic.color = "#fac364";
        } else {
          oevent.graphic.color = "#d998cb";
        }
      }
    }
  }
});
© www.soinside.com 2019 - 2024. All rights reserved.