plainheart commented on code in PR #21352:
URL: https://github.com/apache/echarts/pull/21352#discussion_r2519283334
##########
test/customFormat.html:
##########
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>ECharts Custom Format Test</title>
+ <script src="../dist/echarts.min.js?v=3"></script>
+</head>
+<body>
+ <div id="chart" style="width: 800px; height: 400px;"></div>
+
+ <script>
+ const weeklyData = [
Review Comment:
I suggest adding this test case to the present `test/axis-customTicks.html`.
##########
src/scale/Time.ts:
##########
@@ -206,8 +206,10 @@ class TimeScale extends IntervalScale<TimeScaleSetting> {
let upperUnitIndex = primaryTimeUnits.length - 1;
let maxLevel = 0;
each(ticks, tick => {
- upperUnitIndex = Math.min(upperUnitIndex,
indexOf(primaryTimeUnits, tick.time.upperTimeUnit));
- maxLevel = Math.max(maxLevel, tick.time.level);
+ if (tick.time) {
Review Comment:
I noticed that TypeScript suppresses this TypeError as per the current
tsconfig.json, where the `strictNullChecks` option is disabled. But if we
enable it, there are many errors to be fixed. For simplicity, I agree with your
current fix by adding the safeguard.
@100pah How do you think about this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]