2016-11-17 14 views
0

グラフでは、複数のペインから共有ツールチップを表示したかったのですが、表示されませんでした。要素が唯一の私はコードの下に私のコードグラフコンポーネントの共有ツールチップが表示されない

<kendo-chart *ngIf="series.length >0"> 
     <kendo-chart-value-axis> 
      <kendo-chart-value-axis-item *ngFor="let item of values; trackBy: item?.name" [name]="item.name" [pane]="item.pane" [visible]="false"> 
      </kendo-chart-value-axis-item> 
     </kendo-chart-value-axis> 
     <kendo-chart-panes> 
      <kendo-chart-pane *ngFor="let item of panes; trackBy: item?.name" [height]="ALTURA" [name]="item.name" [clip]="false" [margin]="{ top: 27, bottom: 9 }" 
       [border]="{ color: '#B6B6B6', width: 0 }"></kendo-chart-pane> 
     </kendo-chart-panes> 
     <kendo-chart-category-axis> 
      <kendo-chart-category-axis-item *ngFor="let item of categories; trackBy: item?.name" baseUnit="days" [max]="dataFim" [min]="dataInicio" [name]="item.name" 
       [pane]="item.pane" type="date" [visible]="false" [majorGridLines]="{width:0.5}"> 
       <kendo-chart-category-axis-item-crosshair [visible]="true"> 
        <kendo-chart-category-axis-item-crosshair-tooltip [visible]="true"></kendo-chart-category-axis-item-crosshair-tooltip> 
       </kendo-chart-category-axis-item-crosshair> 
      </kendo-chart-category-axis-item> 
      <kendo-chart-category-axis-item-labels visible="true"> 
      </kendo-chart-category-axis-item-labels> 
     </kendo-chart-category-axis> 
     <kendo-chart-legend [visible]="true" position="custom" orientation="horizontal" offsetX=100></kendo-chart-legend> 
     <kendo-chart-area [width]="WIDTH" [height]="HEIGHT_TOTAL" [margin]="{bottom:0, top:0, left: 0, right: MARGIN}"></kendo-chart-area> 
     <kendo-chart-series> 
      <kendo-chart-series-item *ngFor="let item of series; trackBy: item?.name" [data]="item.data" [axis]="item.axis" [categoryAxis]="item.axis" categoryField="date" 
       [color]="item.color" [aggregate]="lastValue" [name]="item.name" [type]="item.type" field="value" [missingValues]="interpolate" 
       [errorLowField]="low" [errorHighField]="high"> 
       <kendo-chart-series-item-markers [visible]="true" [border]="{'color':checkLimitsColors(item.minimo, item.maximo, value, item.color)}"> 
       </kendo-chart-series-item-markers> 
      </kendo-chart-series-item> 
     </kendo-chart-series> 
    <kendo-chart-tooltip [visible]="true" [shared]="true"></kendo-chart-tooltip> 
    </kendo-chart> 

答えて

0

使用下回ったまま

を強調している、私はチャート<kendo-chart-series-item-tooltip format="{0}">のラベルのツールチップを表示することができています。

データ:

private seriesData: number[] = [15, 20, 33, 50]; 
private xAxisData: number[] = ['New', 'Old', 'Sold', 'Purchase']; 

HTML:

<kendo-chart > 
<kendo-chart-legend position="top" [visible]="true"></kendo-chart-legend> 

<kendo-chart-series> 
<kendo-chart-series-item type="column" [name]="'Series-1'" [data]="seriesData" > 
    <kendo-chart-series-item-labels [visible]="true" format="n"> 
    </kendo-chart-series-item-labels> 
    <kendo-chart-series-item-tooltip format="{0}">     
    </kendo-chart-series-item-tooltip> 
</kendo-chart-series-item> 
</kendo-chart-series> 

<kendo-chart-value-axis> 
<kendo-chart-value-axis-item [visible]="true">  
</kendo-chart-value-axis-item> 
</kendo-chart-value-axis> 

<kendo-chart-category-axis> 
    <kendo-chart-category-axis-item [categories]="xAxisData" > 
     <kendo-chart-category-axis-item-labels [visible]="true" > 
     </kendo-chart-category-axis-item-labels> 
    </kendo-chart-category-axis-item>   
</kendo-chart-category-axis> 
</kendo-chart>