Conformance: fix Time Trend chart done.

This commit is contained in:
chiayin
2023-09-04 10:41:57 +08:00
parent 3f0d1b9e05
commit a0c2d84639
2 changed files with 13 additions and 61 deletions

View File

@@ -572,62 +572,8 @@ export default {
*/
setTimeChartData(data, xMax, xMin, yMax, yMin) {
let max = yMax * 1.1;
// let max = 29 * 1.1;
// 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 xVal = timeRange(xMax, xMin, 100);
let yVal = yTimeRange(data, 100, yMin, yMax);
// console.log(xVal);
data = xVal.map((x, index) => ({ x, y: yVal[index] }));
let formattedXVal = xVal.map(value => formatTime(value));
let selectTimeMinIndex = getXIndex(xVal, this.selectDurationTime.min);
@@ -676,8 +622,8 @@ export default {
scales: {
x: {
ticks: {
// autoSkip: false,
align: 'center',
// autoSkip: false, // 彈性顯示或全部顯示 lable
// autoSkipPadding: 4,
maxRotation: 0, // 不旋轉 lable 0~50
color: '#334155',
display: true,
@@ -720,8 +666,6 @@ export default {
this.isCoverPlate = boolean;
});
this.$emitter.on('timeRangeMaxMin', data => this.selectDurationTime = data);
// this.selectDurationTime = { min: 86834, max: 176265};
// this.setTimeChartData();
},
}
</script>

View File

@@ -20,9 +20,9 @@ export default {
const loadingStore = LoadingStore();
const conformanceStore = ConformanceStore();
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: {
StatusBar,
@@ -38,5 +38,13 @@ export default {
// this.isLoading = true;
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>