openui5-financial-charts
Version:
OpenUI5 Financial Charts based on d3.js
1 lines • 678 B
JavaScript
sap.ui.define(["./Series","./library","./thirdparty/d3","./thirdparty/moment-with-locales"],function(e){"use strict";return e.extend("openui5.financial.chart.SteppedLineChart",{metadata:{aggregations:{items:{type:"openui5.financial.chart.LineChartItem",multiple:true}}},renderer:{},_draw:function(){e.prototype._draw.apply(this);var t=this.getParent();var a=this.getItems();var r=t.getAggregation("_timeAxis")._scale;var i=t.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(e=>r(moment(e.getTime()).toDate())).y(e=>i(e.getValue())).curve(d3.curveStepAfter))}})});