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 2021/08/23 10:36:57 UTC

[GitHub] [echarts] svedova commented on a change in pull request #15583: Fix: time axis overlapped labels

svedova commented on a change in pull request #15583:
URL: https://github.com/apache/echarts/pull/15583#discussion_r693857203



##########
File path: src/component/axis/AxisBuilder.ts
##########
@@ -347,6 +348,16 @@ const builders: Record<'axisLine' | 'axisTickLabel' | 'axisName', AxisElementsBu
         fixMinMaxLabelShow(axisModel, labelEls, ticksEls);
 
         buildAxisMinorTicks(group, transformGroup, axisModel, opt.tickDirection);
+
+        const labelList = prepareLayoutList(labelEls.map(label => ({
+            label,
+            priority: label.style.text?.includes('primary') ? 1 : 0,

Review comment:
       @pissang I was not able to understand how to generate the priorities here so I did something very dirty to see if this works or not. Seems to be working but what is the proper way to assign the priority to the label? I think this should be done somewhere in https://github.com/apache/echarts/blob/master/src/scale/Time.ts as this method is used by many charts, if not all.




-- 
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: commits-unsubscribe@echarts.apache.org

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