在LightningChart JS中更改轴标签颜色 [英] Changing axis label color in LightningChart JS

查看:162
本文介绍了在LightningChart JS中更改轴标签颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

图表显示为深色背景,网格位置的轴数字标签为黄色.

The chart appears with dark background, axis numeric labels in grid positions are yellow.

如何将轴标签颜色更改为白色?

How do I change axis label colors to white?

例如在此示例中, https://www.arction.com/lightningchart- js-interactive-examples/#edit/lcjs_example_0001_simpleScatter

我正在尝试

chart.getDefaultAxisX()
  .setInterval(0, 92 * dataFrequency)
  .setTickStyle((visibleTicks) => visibleTicks
              .setLabelFillStyle( color: ColorRGBA(255, 255, 255) })
             )

但是它给出了SyntaxError:意外的令牌,预期为,"

But it's giving SyntaxError: Unexpected token, expected ","

推荐答案

根据

According to the documentation it expects you to pass FillStyle, not just color. The solution for your case is as follows:

chart.getDefaultAxisX()
  .setInterval(0, 92 * dataFrequency)
  .setTickStyle( (visibleTicks) => visibleTicks
                     .setLabelFillStyle( 
                         new SolidFill( { color: ColorRGBA(255, 255, 255) } )
                     )
               )

这篇关于在LightningChart JS中更改轴标签颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆