UNPKG

openui5-financial-charts

Version:
1 lines 646 B
sap.ui.define(["./Series","./library","./thirdparty/d3","./thirdparty/moment-with-locales"],function(t){"use strict";return t.extend("openui5.financial.chart.LineChart",{metadata:{aggregations:{items:{type:"openui5.financial.chart.LineChartItem",multiple:true}}},renderer:{},_draw:function(){t.prototype._draw.apply(this);var e=this.getParent();var a=this.getItems();var r=e.getAggregation("_timeAxis")._scale;var i=e.getAggregation("_valueAxis")._scale;var n=d3.select("#"+this.getId());n.append("path").datum(a).attr("fill","none").attr("stroke","steelblue").attr("d",d3.line().x(t=>r(moment(t.getTime()).toDate())).y(t=>i(t.getValue())))}})});