Roku:如何更改标签文本大小

时间:2016-11-11 06:11:30

标签: roku brightscript

使用场景图的明亮脚本。我想更改没有字体节点的默认字体的大小。我使用了“SmallestSystemFont”字体。它似乎是大字体,然后实际需要大小。

<kendo-chart-legend [visible]="chart.Data.showLegend" position="top"></kendo-chart-legend>
<kendo-chart-title id="chartTitle"
                   [visible]="chart.Options.title.display" [text]="chart.Options.title.text">
</kendo-chart-title>

<kendo-chart-category-axis>
    <kendo-chart-category-axis-item [categories]="chart.Data.labels"
                                    [labels]="{ rotation: 'auto' }"
                                    [title]="chart.Options.XTitle">
    </kendo-chart-category-axis-item>
</kendo-chart-category-axis>

<kendo-chart-value-axis>
    <kendo-chart-value-axis-item [title]="chart.Options.YTitle">
    </kendo-chart-value-axis-item>
</kendo-chart-value-axis>

<kendo-chart-series (seriesClick)="onSeriesClick($event)">
    <span *ngFor="let dataset of chart.Data.datasets">
        <kendo-chart-series-item [name]="dataset.label" [data]="dataset.data"
                                 [type]="dataset.type">
            <kendo-chart-series-item-labels visible="true" [content]="setLabelFormat">

            </kendo-chart-series-item-labels>    
        </kendo-chart-series-item>

    </span>

</kendo-chart-series>

1 个答案:

答案 0 :(得分:5)

将此代码添加到附加到组件的脚本中:

myLabel = m.top.findNode("myLabel")
myLabel.font.size = 20

每个Label节点都有Font节点。因此,您只需访问它并更改其属性即可。