Gracie williams
Gracie williams

Reputation: 1145

How to change label size in lightningchart

How do we change label font size and color in Lightning chart enter image description here

I add the label using code like below

 return builder
        .addRow(name)
        .addRow(yValue.toFixed(2))
        .addRow(timedata[xValue.toFixed(0)])

Also is it possible to seperately change color and size for only .addRow(yValue.toFixed(2)) ??

Upvotes: 0

Views: 240

Answers (1)

Niilo Keinänen
Niilo Keinänen

Reputation: 2582

AutoCursor result table font size / text color can be changed like this

chart.setAutoCursor((autoCursor) => autoCursor
   .setResultTable((resultTable) => resultTable
      .setFont((font) => font.setSize(12))
      .setTextFillStyle(new SolidFill({ color: ColorRGBA( 255, 0, 0 ) }))
   )
)

AutoCursorXY API

ResultTable API

Upvotes: 1

Related Questions