Conformance: fix Time Trend conformance chart blue color done.
This commit is contained in:
@@ -623,7 +623,7 @@ export default {
|
||||
x: {
|
||||
ticks: {
|
||||
// autoSkip: false, // 彈性顯示或全部顯示 lable
|
||||
// autoSkipPadding: 4,
|
||||
// autoSkipPadding: 4, // lable 之間的距離
|
||||
maxRotation: 0, // 不旋轉 lable 0~50
|
||||
color: '#334155',
|
||||
display: true,
|
||||
|
||||
@@ -142,10 +142,10 @@ export function getXIndex(data, xValue) {
|
||||
let closestIndex = xValue; // 假定第一个元素的索引是 0
|
||||
let smallestDifference = Math.abs(xValue - data[0]); // 初始差值设为第一个元素与目标数的差值
|
||||
|
||||
for (let i = 1; i < data.length; i++) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let difference = Math.abs(xValue - data[i]);
|
||||
|
||||
if (difference < smallestDifference) {
|
||||
if (difference <= smallestDifference) {
|
||||
closestElement = data[i];
|
||||
closestIndex = i;
|
||||
smallestDifference = difference;
|
||||
|
||||
Reference in New Issue
Block a user