bito-code-review[bot] commented on code in PR #43238:
URL: https://github.com/apache/superset/pull/43238#discussion_r4087117472
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts:
##########
@@ -109,66 +109,66 @@ import {
transformIntervalAnnotation,
transformSeries,
transformTimeseriesAnnotation,
-} from './transformers';
+} from "./transformers";
import {
OpacityEnum,
StackControlsValue,
TIMEGRAIN_TO_TIMESTAMP,
TIMESERIES_CONSTANTS,
-} from '../constants';
-import { getDefaultTooltip } from '../utils/tooltip';
+} from "../constants";
+import { getDefaultTooltip } from "../utils/tooltip";
import {
getPercentFormatter,
getTooltipTimeFormatter,
getXAxisFormatter,
getYAxisFormatter,
-} from '../utils/formatters';
-import { safeParseEChartOptions } from '../utils/safeEChartOptionsParser';
-import { mergeCustomEChartOptions } from '../utils/mergeCustomEChartOptions';
+} from "../utils/formatters";
+import { safeParseEChartOptions } from "../utils/safeEChartOptionsParser";
+import { mergeCustomEChartOptions } from "../utils/mergeCustomEChartOptions";
-const visibleDashPatterns: ([number, number] | 'dashed' | 'dotted')[] = [
- 'dashed',
- 'dotted',
+const visibleDashPatterns: ([number, number] | "dashed" | "dotted")[] = [
+ "dashed",
+ "dotted",
[6, 15], // narrow dashed
[2, 10], // wide dotted
[20, 3], // wide dashed
];
const visibleSymbols = [
- 'rect',
- 'triangle',
- 'diamond',
- 'roundRect',
- 'pin',
+ "rect",
+ "triangle",
+ "diamond",
+ "roundRect",
+ "pin",
] as const;
function getSymbolMarker(symbol: string, color: string) {
const size = 10;
switch (symbol) {
- case 'circle':
+ case "circle":
return `<span style="
display:inline-block;width:${size}px;height:${size}px;
border-radius:50%;background:${color};margin-right:5px"></span>`;
- case 'rect':
+ case "rect":
return `<span style="
display:inline-block;width:${size}px;height:${size}px;
background:${color};margin-right:5px"></span>`;
- case 'roundRect':
+ case "roundRect":
return `<span style="
display:inline-block;width:${size}px;height:${size}px;border-radius:2px;
background:${color};margin-right:5px"></span>`;
- case 'triangle':
+ case "triangle":
return `<span style="
display:inline-block;width:0;height:0;
border-left:${size / 2}px solid transparent;
border-right:${size / 2}px solid transparent;
border-bottom:${size}px solid ${color};
margin-right:5px"></span>`;
- case 'diamond':
+ case "diamond":
Review Comment:
<!-- Bito Reply -->
The suggestion to extract the HTML marker generation into a helper function
is valid, as it would reduce code duplication for the various marker types.
However, since this code is pre-existing and outside the scope of the current
pull request, it is appropriate to resolve the thread without applying the
change to keep the focus on the PR's actual modifications.
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts:
##########
@@ -1108,9 +1159,9 @@ export default function transformProps(
// at the axis boundary.
...(showMaxLabel && {
showMaxLabel: true,
- alignMaxLabel: 'right',
+ alignMaxLabel: "right",
showMinLabel: true,
- alignMinLabel: 'left',
+ alignMinLabel: "left",
Review Comment:
<!-- Bito Reply -->
The user's decision to resolve the thread is appropriate. Since the code
block in question is untouched by the current pull request and matches the
existing implementation in the master branch, it is correct to leave it as is
rather than refactoring it within this PR.
--
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]