Динамический кендо-чарт-сериал-элемент Kendo UI Angular 6

Вы можете использовать document.queryselector для поиска и управления атрибутом href с помощью js

Пример:

input = document.querySelector('input');
a = document.querySelector('a');
a.setAttribute('href',a.getAttribute('href')+input.value);
<input type="text" id="qta_field" value="test"/>
<a href="updateItem?codice=${item.key.codice}&quantita=">update</a>

0
задан VishnuER 16 January 2019 в 13:18
поделиться

1 ответ

Finally I solved it

import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  template: `
    <kendo-chart style="height: 200px;" [valueAxis]="{ min: 100 }">
      <kendo-chart-series>
        <kendo-chart-series-item 
        type="rangeBar" [spacing]="-1" 
        *ngFor="let series of model" [data]="series.data" 
        fromField="start" toField="end" categoryField="category">
        </kendo-chart-series-item>                  
      </kendo-chart-series>
    </kendo-chart>

  `
})
export class AppComponent {
  public data1 = [
    { category: "A", start: 100, end: 110, color: 'blue' },
    { category: "B", start: 110, end: 120, color: 'blue' },
    { category: "C", start: 120, end: 130, color: 'blue' }
  ];

  public data2 = [
    { category: "A", start: 120, end: 130, color: 'red' },
    { category: "B", start: 130, end: 140, color: 'red' },
    { category: "C", start: 140, end: 150, color: 'red' }
  ];  

   public showSeries: boolean = false;
    public model = [];


 constructor(){

   this.model.push({ data:this.data1 });  

   this.model.push({data:this.data2  });

   console.log(JSON.stringify(this.model));


 }




}
0
ответ дан VishnuER 16 January 2019 в 13:18
поделиться
Другие вопросы по тегам:

Похожие вопросы: