-
Notifications
You must be signed in to change notification settings - Fork 6
/
_cycletimeChart.js
71 lines (64 loc) · 1.93 KB
/
_cycletimeChart.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Ext.define('Rally.technicalservices.cycleTimeChart',{
extend: 'Rally.ui.chart.Chart',
alias: 'widget.progresschart',
itemId: 'rally-chart',
chartData: {},
loadMask: false,
chartColors : [],
chartConfig: {
// colors : ["#E0E0E0","#00a9e0","#fad200","#8dc63f"],
chart: {
type: 'scatter',
zoomType: 'xy'
},
title: {
text: 'Cycle Time'
},
subtitle: {
text: ''
},
xAxis: {
type: 'datetime',
// dateTimeLabelFormats: {
// day: '%e of %b'
// }
//tickInterval : 24 * 3600 * 1000,
title: {
enabled : true,
text: 'Date'
},
startOnTick: true,
endOnTick: true
},
yAxis: [
{
title: {
text: 'Days'
}
}
],
plotOptions: {
scatter: {
tooltip: {
xDateFormat: '%Y-%m-%d',
headerFormat: '<b>{series.name}</b><br>',
pointFormat: '{point.x}<br>{point.workItem.FormattedID}:{point.workItem.Name} ({point.y})'
}
}
}
},
constructor: function (config) {
// var config = Ext.merge()
_.first(this.chartConfig.yAxis).plotLines = config.chartData.plotLines;
_.first(this.chartConfig.yAxis).title.text = config.chartData.granularity;
if (!_.isUndefined(config.chartData.plotBands)) {
_.first(this.chartConfig.yAxis).plotBands = config.chartData.plotBands;
}
this.chartConfig.subtitle.text = config.chartData.subtitle.text;
this.callParent(arguments);
console.log("chart config",this.chartConfig);
if (config.title){
this.chartConfig.title = config.title;
}
}
});