【问题标题】:How to aligned symbol in highcharts js?如何在 highcharts js 中对齐符号?
【发布时间】:2022-11-30 18:03:53
【问题描述】:
Now it looks like this

enter image description here

应该是:enter image description here


传奇: { 浮动:真实, 对齐:'左', verticalAlign: '顶部', 是:0, ×:-20, 宽度:150, itemMarginTop:12, itemMarginBottom: 12, alignItem: '居中', textAlign: '40px', 项目样式:{ fontFamily: 'Inter', 显示:'内联块', verticalAlign: '中间' }, labelFormatter() { 返回<span style="font-size: 14px;color: #595959;font-weight: 400;">${this.name}</span><br><span style="font-size: 18px;color: #1C1C1E;font-weight: 600;">${this.y}</span> } }


【问题讨论】:

    标签: highcharts


    【解决方案1】:

    在图例.highcharts-legend-item 的样式选项中,您可以更改项目的位置,Highcharts 中没有直接选项用于调整与标签相关的符号位置。在此解决方案中,您需要使用legend.useHTML 来呈现图例项。

    .highcharts-legend-item  {
        top: -10px !important;
    }
    

    演示:https://jsfiddle.net/BlackLabel/6479m1y0/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-07-21
      • 2021-12-09
      • 2013-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-10
      相关资源
      最近更新 更多