You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/12/21 22:54:52 UTC

[GitHub] [incubator-echarts] chfw commented on a change in pull request #13489: feat(tooltip): added marker options. close #13413

chfw commented on a change in pull request #13489:
URL: https://github.com/apache/incubator-echarts/pull/13489#discussion_r546970820



##########
File path: src/util/format.ts
##########
@@ -202,19 +202,26 @@ interface GetTooltipMarkerOpt {
     // id name for marker. If only one marker is in a rich text, this can be omitted.
     // By default: 'markerX'
     markerId?: string;
+    size?: string;
 }
 // Only support color string
-export function getTooltipMarker(color: ColorString, extraCssText?: string): TooltipMarker;
+export function getTooltipMarker(color: ColorString, size?: string, extraCssText?: string): TooltipMarker;
 export function getTooltipMarker(opt: GetTooltipMarkerOpt): TooltipMarker;
 export function getTooltipMarker(inOpt: ColorString | GetTooltipMarkerOpt, extraCssText?: string): TooltipMarker {
     const opt = zrUtil.isString(inOpt) ? {
         color: inOpt,
-        extraCssText: extraCssText
+        extraCssText: extraCssText,
+        size: inOpt
     } : (inOpt || {}) as GetTooltipMarkerOpt;
     const color = opt.color;
     const type = opt.type;
     extraCssText = opt.extraCssText;
     const renderMode = opt.renderMode || 'html';
+    let size = opt.size;
+
+    if (!size) {
+        size = '10px';
+    }

Review comment:
       can the initialization of 'size' be done in the consistent way as `renderMode`?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org