Conformance: fix Time Trend chart done.
This commit is contained in:
@@ -572,62 +572,8 @@ export default {
|
|||||||
*/
|
*/
|
||||||
setTimeChartData(data, xMax, xMin, yMax, yMin) {
|
setTimeChartData(data, xMax, xMin, yMax, yMin) {
|
||||||
let max = yMax * 1.1;
|
let max = yMax * 1.1;
|
||||||
// let max = 29 * 1.1;
|
let xVal = timeRange(xMax, xMin, 100);
|
||||||
|
|
||||||
// data = [
|
|
||||||
// {
|
|
||||||
// x: 434,
|
|
||||||
// y: 16
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 13365,
|
|
||||||
// y: 19
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 39228,
|
|
||||||
// y: 22
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 65091,
|
|
||||||
// y: 18
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 90954,
|
|
||||||
// y: 14
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 116817,
|
|
||||||
// y: 21
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 142681,
|
|
||||||
// y: 18
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 168544,
|
|
||||||
// y: 16
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 194407,
|
|
||||||
// y: 20
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 220270,
|
|
||||||
// y: 10
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 246133,
|
|
||||||
// y: 29
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// x: 259065,
|
|
||||||
// y: 29
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
yMax = 29;
|
|
||||||
let xVal = timeRange(434, 259065, 100);
|
|
||||||
let yVal = yTimeRange(data, 100, yMin, yMax);
|
let yVal = yTimeRange(data, 100, yMin, yMax);
|
||||||
// console.log(xVal);
|
|
||||||
data = xVal.map((x, index) => ({ x, y: yVal[index] }));
|
data = xVal.map((x, index) => ({ x, y: yVal[index] }));
|
||||||
let formattedXVal = xVal.map(value => formatTime(value));
|
let formattedXVal = xVal.map(value => formatTime(value));
|
||||||
let selectTimeMinIndex = getXIndex(xVal, this.selectDurationTime.min);
|
let selectTimeMinIndex = getXIndex(xVal, this.selectDurationTime.min);
|
||||||
@@ -676,8 +622,8 @@ export default {
|
|||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
ticks: {
|
ticks: {
|
||||||
// autoSkip: false,
|
// autoSkip: false, // 彈性顯示或全部顯示 lable
|
||||||
align: 'center',
|
// autoSkipPadding: 4,
|
||||||
maxRotation: 0, // 不旋轉 lable 0~50
|
maxRotation: 0, // 不旋轉 lable 0~50
|
||||||
color: '#334155',
|
color: '#334155',
|
||||||
display: true,
|
display: true,
|
||||||
@@ -720,8 +666,6 @@ export default {
|
|||||||
this.isCoverPlate = boolean;
|
this.isCoverPlate = boolean;
|
||||||
});
|
});
|
||||||
this.$emitter.on('timeRangeMaxMin', data => this.selectDurationTime = data);
|
this.$emitter.on('timeRangeMaxMin', data => this.selectDurationTime = data);
|
||||||
// this.selectDurationTime = { min: 86834, max: 176265};
|
|
||||||
// this.setTimeChartData();
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ export default {
|
|||||||
const loadingStore = LoadingStore();
|
const loadingStore = LoadingStore();
|
||||||
const conformanceStore = ConformanceStore();
|
const conformanceStore = ConformanceStore();
|
||||||
const { isLoading } = storeToRefs(loadingStore);
|
const { isLoading } = storeToRefs(loadingStore);
|
||||||
const { conformanceLogId } = storeToRefs(conformanceStore);
|
const { conformanceLogId, selectedRuleType, selectedActivitySequence, selectedMode, selectedProcessScope, selectedActSeqMore, selectedActSeqFromTo } = storeToRefs(conformanceStore);
|
||||||
|
|
||||||
return { isLoading, conformanceLogId, conformanceStore }
|
return { isLoading, conformanceLogId, conformanceStore, selectedRuleType, selectedActivitySequence, selectedMode, selectedProcessScope, selectedActSeqMore, selectedActSeqFromTo, }
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
StatusBar,
|
StatusBar,
|
||||||
@@ -38,5 +38,13 @@ export default {
|
|||||||
// this.isLoading = true;
|
// this.isLoading = true;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.selectedRuleType = 'Have activity';
|
||||||
|
this.selectedActivitySequence = 'Start & End';
|
||||||
|
this.selectedMode = 'Directly follows';
|
||||||
|
this.selectedProcessScope = 'End to end';
|
||||||
|
this.selectedActSeqMore = 'All';
|
||||||
|
this.selectedActSeqFromTo = 'From';
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user