Telerik Forums
Kendo UI for Angular Forum
3 answers
751 views

Hi

I have a stacked bar chart that I want to have the series labels to be dynamically created on the last "color"

Currently in the attached file, i attached the series label to my "blue" bar.  However once inside the callback I can't get to my component to generate a dynamic label.

If i have just 2 colors, i can calculate the label using "value" and "stackedValue" ... but with more than 2 i need to get at my component

So how can I get the label to show total for each color in the row, not just the last color, ie

1st row is 1/4/7
2nd row is 2/5/8
3rd row is 3/6/9

Here is my sample

https://stackblitz.com/edit/angular-vushqc?file=app/app.component.ts

Thanks

David
Top achievements
Rank 1
 answered on 18 Apr 2019
2 answers
657 views

 using the Splitter for left / right layout and  looking to find a way to make the splitter take up full height and width of the screen.

I have tried style="height: 100%;" on the 

<kendo-splitter orientation="vertical" style="height: 100%;">

but this didnt do anything. If I set the height to a px value it works fine.

 

Please help - here is a   for an example.

 

 

https://stackblitz.com/edit/angular-smpykp?file=src%2Fapp%2Fapp.component.ts

Chris
Top achievements
Rank 2
 answered on 17 Apr 2019
1 answer
1.7K+ views

Hello

I have an option list, and depending on the selection one of two ComboBoxes should be required

But the required state only gets active, after I select a value in the ComboBox which is meant to be required - when I then delete the entry again, it displays as error and the form gets invalid, but not directly after setting it via code and updating value&validitiy

 

<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
    <label for="lastname">{{'BORN_IN' | translate}}</label>
    <div [ngClass]="{'w-error': formGroup.get('BirthDomestic').invalid }">
        <label class="i-check-label w-marging-offset-bottom">
            <input type="radio"
                   name="BirthDomestic"
                   formControlName="BirthDomestic"
                   (change)="onBirthDomesticChange($event)"
                   [value]="1"
                   cubidoICheck />
            {{ 'ITALY' | translate }}
        </label>
    </div>
    <div [ngClass]="{'w-error': formGroup.get('BirthDomestic').invalid }">
        <label class="i-check-label w-marging-offset-bottom">
            <input type="radio"
                   name="BirthDomestic"
                   formControlName="BirthDomestic"
                   (change)="onBirthDomesticChange($event)"
                   [value]="0"
                   cubidoICheck />
            {{ 'ABROAD' | translate }}
        </label>
    </div>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
    <label>{{'BIRTHPLACE' | translate}}</label>
    <div class="k-widget-override" [ngClass]="{'w-error': formGroup.get('BirthRegionId').invalid }">
        <kendo-combobox [data]="regionCodes.RegionCodes"
                        [placeholder]="'SELECT_REGION' | translate"
                        [valuePrimitive]="true"
                        [valueField]="'Id'"
                        [textField]="'FilterName'"
                        formControlName="BirthRegionId"
                        [clearButton]="false"
                        [filterable]="true"
                        (filterChange)="regionCodeFilterChanged($event)">
            <kendo-combobox-messages noDataText="{{ 'NO_DATA_FOUND_TWO_CHARS' | translate }}">
            </kendo-combobox-messages>
        </kendo-combobox>
    </div>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
    <label>{{'BIRTHPLACE' | translate}}</label>
    <div class="k-widget-override" [ngClass]="{'w-error': formGroup.get('BirthCountryId').invalid }">
        <kendo-combobox [data]="countryCodes.CountryCodes"
                        [placeholder]="'SELECT_COUNTRY_2' | translate"
                        [valuePrimitive]="true"
                        [valueField]="'Id'"
                        [textField]="'FilterName'"
                        formControlName="BirthCountryId"
                        [clearButton]="false"
                        [filterable]="true"
                        (filterChange)="countryCodeFilterChanged($event)">
            <kendo-combobox-messages noDataText="{{ 'NO_DATA_FOUND_TWO_CHARS' | translate }}">
            </kendo-combobox-messages>
        </kendo-combobox>
    </div>
</div>

 

public onBirthDomesticChange(): void
{
    if (this.formGroup.controls["BirthDomestic"].value === 1)
    {
        this.formGroup.controls["BirthRegionId"].setValidators(Validators.required);
        this.formGroup.controls["BirthCountryId"].setValidators(Validators.nullValidator);
    }
    else
    {
        this.formGroup.controls["BirthRegionId"].setValidators(Validators.nullValidator);
        this.formGroup.controls["BirthCountryId"].setValidators(Validators.required);
    }
    this.formGroup.updateValueAndValidity();
}

 

Best regards

Jürgen


Svet
Telerik team
 answered on 17 Apr 2019
1 answer
78 views
I have a grid which only 2 column are editable, and not all rows editable. How can I make these rows in edit mode at the same screen?
T. Tsonev
Telerik team
 answered on 17 Apr 2019
5 answers
655 views

Hi,

How can I go about making the menu responsive?

Something similar to this: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_responsive_navbar_dropdown

Thanks.

Svet
Telerik team
 answered on 15 Apr 2019
1 answer
601 views

Hi,

I am using kendo-tabstrip-tab. In each of the tab's content I have a kendo-grid. When we switch between the tabs, there is painting issue.I see the following information on your website.

"By default, the component either creates the content of all its tabs when it is initialized or creates the content of each tab when the tab becomes active. When the

When set to true, the component renders all tabs and they are persisted in the DOM. By default, keepTabContent is false.tab is not in use anymore, the TabStrip destroys it. This specific default behavior depends on the value of the keepTabContent option.

"

Where do I set keepTabContent=true ? Will this solve the painting issue when we switch between tabs.

Regards,

Jyothi

Dimiter Topalov
Telerik team
 answered on 12 Apr 2019
5 answers
188 views

Hi.

Will the virtualization functionality be released for combobox and dropdown widgets. I have seen several posts of users that are asking for it. It already exists for react and vue.js. Can you tell me please if you are planning (and when) to implement the same functionality as well in kendo for angular? 

Kind regards,

Dimiter Topalov
Telerik team
 answered on 12 Apr 2019
1 answer
95 views

The current scheduler seems to have the all-or-nothing approach when it comes to displaying events within a slot.  So if even a few minutes are used in a slot then the entire slot is filled.  This approach is different then what you experience in say Microsoft Outlook which has a more flexible way of displaying events.

Take this for example

https://stackblitz.com/edit/angular-uapm6j

 

My event is only a half-hour but based on the display it appears to consume an entire hour.  But doing something similar in Outlook actually shows than an event only takes up partial slots (please see attached).

Are there any plans to make the event display more flexible so events only fill what is actually being used?

Svet
Telerik team
 answered on 11 Apr 2019
2 answers
905 views

Hi,

I'm using Kendo UI Window component for Angular and want to prevent users from maximizing the window. Telerik Kendo UI Window component
I was able to remove the Maximize-button, but a Dobuleclick on titlebar still maximizes the window (.

Any solution for this?

Regards,

Jyothi

Jyothi
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 10 Apr 2019
3 answers
910 views

     Hello,

I'm following the databinding example in my project. I'm trying to load an scheduler with data coming from ASP.NET CORE api backend. The trouble i'm having is that this data is loaded async and i'm not able to show data on the scheduler. What I managed to do is load my resources on the board and that shows correctly. But tieing the events to the slot is where I'm stuck 

This is the code I got

      <kendo-scheduler
        [resources]="resources"
        [kendoSchedulerBinding]="events | async"
        (dateChange)="onDateChange($event)"
        [group]="group"
        [selectedDate]="selectedDate"
        *ngIf="!isLoading">
        <ng-template kendoSchedulerGroupHeaderTemplate let-resource="resource">
          <span [style.color]="resource.color">{{ resource.text }}</span>
        </ng-template>
        <kendo-scheduler-timeline-view> 
        </kendo-scheduler-timeline-view>
        <kendo-scheduler-timeline-week-view>
        </kendo-scheduler-timeline-week-view>
      </kendo-scheduler>

 

 ngOnInit() {
    this.isLoading = true;
    this.getLocations().then(data => {
      let result: any[] | { text: string; value: string; color: string }[] = [];
      data.forEach(element => {
        result.push({
          text: element.shortName,
          value: element.locationId,
          color: "#6eb3fa"
        });
      });

      this.resources[0].data = result;
      this.isLoading = false;

    });

    this.events = this.scheduleService.getSchedule(1690, '2018-10-22T00:00:00', '2018-10-22T00:00:00', 'C9FA11C2-B1DA-42FE-971A-BD1D5DB8E683', false);
    console.log(this.events);
  }

  ngAfterViewInit() {
    console.log('view loaded');
    this.events.forEach(item => {
      console.log(item);
    })
  }

  async getLocations(): Promise<Location[]> {
    let locationId = this.locationService.currentLocation.locationId;
    let response = this.locationService
      .getPlanningLocations(locationId)
      .toPromise();
    return response;
  }

getSchedule(securable: number, fromDate: string, untilDate: string, locationId: string, isBulk: boolean): Observable<SchedulerEvent[]> {
const params = new HttpParams()
.set('Securable', securable.toString())
.set('StartDate', fromDate)
.set('EndDate', untilDate)
.set('LocationID', locationId.toString())
.set('IsBulk', isBulk.toString());
return this.http.get<Schedule[]>(endpoint + '/GetSchedule', { headers: headers, params: params }).pipe(map(data => {
return data.map(item => {
return <SchedulerEvent>{ id: item.scheduleId, start: new Date(item.startDate), end: new Date(item.endDate), title: item.scheduleERPCode, locationId: item.locationId };
});
}));
}

 

getPlanningLocations(id: string): Observable<Location[]> {
return this.http.get<Location[]>(endpoint + `/GetPlanningLocations/${id}`, { headers: headers });
}

 

Can someone point me in the right direction ?

 

Dimiter Topalov
Telerik team
 answered on 08 Apr 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?