设置数据源时,Nativescript-ui图表不会显示标签[iOS]

时间:2019-01-29 13:23:06

标签: angular2-nativescript nativescript-telerik-ui

在我的应用程序中使用Nativescript ui图表,它在Android上运行良好,但在iOS上,一旦添加数据源,它将不会在任何轴上显示所有标签。我究竟做错了什么?有什么想法吗?

没有数据源: Without data source

使用数据源: With data source:

<StackLayout *ngIf="series$ | async as series" class="flex-container" orientation="vertical">
  <app-action-bar></app-action-bar>
  <ng-container *ngIf="series?.length > 0; else emptyWidget">
    <Label class="title" textWrap="true" [text]="widget.settings.title" horizontalAlignment="center"></Label>
    <RadCartesianChart tkExampleTitle tkToggleNavButton>
      <ng-container *ngFor="let serie of series">
        <ng-container [ngSwitch]="serie.type">
          <LinearAxis tkCartesianVerticalAxis allowZoom="true" allowPan="true" horizontalLocation="Left" [labelFormat]="'%0.0f'" [lineColor]="serie.color" labelTextColor="#191f3d" labelSize="13" android:lineThickness="3" labelMargin="10" [minimum]="minValue" [maximum]="maxValue"></LinearAxis>
          <DateTimeContinuousAxis tkCartesianHorizontalAxis lineColor="#D8D8D8" labelTextColor="#191f3d" labelSize="11" dateFormat="hh:00" lineThickness="3" labelMargin="10" [minimum]="backwardHour" [maximum]="forwardHour" majorStep="Hour" labelFitMode="Rotate"></DateTimeContinuousAxis>
          <LineSeries tkCartesianSeries [seriesName]="serie.id" *ngSwitchCase="'Line'" [legendTitle]="serie.name + ' - ' + serie.baseUnit" [items]="serie.data" stackMode="Stack" categoryProperty="timestamp" valueProperty="value">
            <Palette tkCartesianPalette [seriesName]="serie.id">
              <PaletteEntry tkCartesianPaletteEntry [fillColor]="serie.color" [strokeColor]="serie.color"></PaletteEntry>
            </Palette>
          </LineSeries>
          <SplineSeries tkCartesianSeries allowZoom="true" allowPan="true" [seriesName]="serie.id" *ngSwitchCase="'Spline'" [legendTitle]="serie.name + ' - ' + serie.baseUnit" [items]="serie.data" stackMode="Stack" categoryProperty="timestamp" valueProperty="value">
            <Palette tkCartesianPalette [seriesName]="serie.id">
              <PaletteEntry tkCartesianPaletteEntry [fillColor]="serie.color" [strokeColor]="serie.color"></PaletteEntry>
            </Palette>
          </SplineSeries>
        </ng-container>
      </ng-container>
    </RadCartesianChart>
  </ng-container>
</StackLayout>

0 个答案:

没有答案