首页 > 解决方案 > Highstocks 如何更改范围选择器按钮的字体

问题描述

我构建了一个 Highstock 图表并想更改按钮的字体。见小提琴

buttonTheme: {
              fill: '#0065b3',
              padding: 10,
              width: 60,
              r: '5',
              style: {
                    fontFamily: 'Poppins'
                     },
              states: {
                    hover: {
                          style: {
                              fontFamily: 'Poppins',
                              fontWeight: 'bold'
                                }                           
                          },
                    select: {
                          style: {
                              fontFamily: 'Poppins'
                                  }
                             }
                      }
                      },

所选按钮的字体正确,但其他字体不正确。将鼠标悬停在它们上方后,他们会获得正确的字体并保留它。当您重新加载图形时,字体再次丢失。我能做些什么?

标签: highcharts

解决方案


尝试使用 CSS 属性将其设置为解决方法:

.highcharts-range-selector-buttons {
    font-family: Poppins !important;
}

演示:https ://jsfiddle.net/BlackLabel/qfp1erjv/


推荐阅读