Telerik Forums
Kendo UI for Angular Forum
0 answers
4 views

I am using Kendo Angular Charts 7.1.0 with Angular 14.0.4

Currently it displays the Stock Chart of Kendo like below...

 

How to move the below readings pane height wise to little bit below like 30px so that it won't overlap with date readings...?

This is because it is happening with negative values in the above chart.

Any help would be greatly appreciated.

 

CPK
Top achievements
Rank 1
 asked on 15 Apr 2024
0 answers
3 views

I am trying to create a heirarchial drawer, I have pasted her my html, ts and scss files as they are.

I have set up the items for the drawer in the ts file and used id and parent id. If I don't use template in html then they all appear fine and nested as they should be but I am unable to apply mouse over or active/selected css styles to the drawer items. If I use template then I am able to apply css mouse over and active styles but then I don't know how to get the drawer subitems to work. Can you please help me with this? The help online shows only setting up in ts file and does not show, how you can apply mouse over etc to custom svg icons or the text. This is very urgent.

Regards,

Adeel

This is my html:

<kendo-drawer-container class="side-bar-container-drawer-container">

      <kendo-drawer #drawer [items]="drawerItems" [mini]="isV6Enabled"  mode="push" [autoCollapse]="false"

        [(expanded)]="expanded" (select)="onSelect($event)" [isItemExpanded]="isItemExpanded">

        <ng-template kendoDrawerItemTemplate let-item let-level="level" let-hasChildren="hasChildren"

        let-isItemExpeanded="isItemExpanded">

          <ng-container>

              <kendo-svgicon [icon]="item.svgIcon"></kendo-svgicon>  

              <span class="drawerspan">{{ item.text }}</span>


          </ng-container>

        </ng-template>

      </kendo-drawer>

      <kendo-drawer-content>

        <router-outlet></router-outlet>

      </kendo-drawer-content>

    </kendo-drawer-container>

and this imy ts file:

export class SideBarComponent implements AfterViewInit {

  public expandedIndices = [0];

  public selected = "Home";

  public drawerItems: Array<DrawerItem> = [

    {text: "Home", svgIcon: DrawerHome, cssClass: "drawerspan", selected: true, id: 0 },

    {text: "Monitor", svgIcon: bellIcon, cssClass: "drawerspan",  id: 1 },

    {text: "Review", svgIcon: calendarIcon, cssClass: "svg-icon-hover",  id: 2 },  

    {text: "Analyse", svgIcon: envelopeLinkIcon, cssClass: "drawerspan", id: 3 },

    {text: "Line Operations", id: 4, parentId: 3},

    {text: "Line Engineering", id: 5, parentId: 3 },

    {text: "Site Operations", id: 6, parentId: 3 },

    {text: "Site Engineering", id: 7, parentId: 3 },

    {text: "Planning", id: 8, parentId: 3 },

    {text: "Waste", id: 9, parentId: 3 },

    {text: "KPIs", id: 10, parentId: 3 },

    {text: "Activity", svgIcon: starOutlineIcon, id: 11 },

    {text: "Search", svgIcon: envelopeLinkIcon, id: 12 },

    {text: "Help", svgIcon: starOutlineIcon, id: 13 },

  ]

  @Input() items: MenuItemModel[];

  @Input() isV6Enabled: boolean;

  @Input() expanded: boolean;

  @Input() autoCollapse: boolean;

  @Input() updateBadgeVisibility$: BehaviorSubject<boolean>;

  @Input() refreshDefaultPage$: BehaviorSubject<boolean>;

  @Input() toggleDrawer$ : BehaviorSubject<boolean>;

  @Input() userIsAuthenticated: boolean;

  @Input() logo: string;

  @ViewChild('drawer') public drawer: DrawerComponent;

  selectedItem: any;

  constructor(private route: ActivatedRoute,

              private router: Router) {

  }

  ngAfterViewInit(): void {

    this.toggleDrawer$?.subscribe(result => {

      if (result) {

        this.drawer.toggle();

      }

    });

  }

  public isItemExpanded: DrawerItemExpandedFn = (item): boolean => {

    return this.expandedIndices.indexOf(item.id) >= 0;

  };

  isSelected(item: any): boolean {

    return this.selectedItem === item;

    }

    getIconClasses(level: number, item: any): any {

      const classes = {};

      classes['k-level-' + level] = !this.isSelected(item);

      classes['k-level-' + level + '-selected'] = this.isSelected(item);

      return classes;

    }

  getItemIcon(item: any, isItemExpanded: boolean): string {

    const iconMap: { [key: string]: string } = {

      'traceability': 'categorizeIcon',

      'lineview admin': 'gearsIcon',

      'customer admin': 'userIcon'

    };

    const lowerCaseText = item.text.toLowerCase();

    if (iconMap.hasOwnProperty(lowerCaseText)) {

      return iconMap[lowerCaseText];

    } if (isItemExpanded) {

      return 'folderOpenIcon';

    } else if (!isItemExpanded) {

      return 'folderIcon';

    } else {

      return item.icon;

    }

  }

  public refreshDefaultPage() {

    this.refreshDefaultPage$?.next(true);

  }

  public onMouseOver(ev: DrawerSelectEvent): void {

    ev.item.svgIcon = bellIcon;

  }

  public onSelect(ev: DrawerSelectEvent): void {

    this.selected = ev.item.text;

    const current = ev.item.id;

    if (ev.item.id == 0)

    {

      ev.item.svgIcon = DrawerHomeActive;

    }

    else {

      this.drawerItems[0].svgIcon = DrawerHome;

    }

    if (this.expandedIndices.indexOf(current) >=0)

    {

      this.expandedIndices = this.expandedIndices.filter(

        (id) => id !== current);

    }

    else

    {

        this.expandedIndices.push(current);

    }

  }

}

 

and this is my page scss:

.side-bar-container {

    width: 100%;

    &-appbar {

        width: 80px;

        float: left

    }

    &-drawer {

        width: 1700;

        margin-left: 80px;

        &-container {

            height:900px

        }

    }

}

.k-drawer-wrapper {

    width: 243px !important;

}

.k-i-menu {

    font-size: 25px;

}

.k-level-0 {

    font-size: 20px;

    padding-left: 10px;

    filter: brightness(0%);

    &:hover{

        filter: invert(48%) sepia(88%) saturate(1265%) hue-rotate(347deg) brightness(98%) contrast(94%);

    }

}

.k-level-0-selected {

    font-size: 20px;

    padding-left: 10px;

    filter: invert(48%) sepia(88%) saturate(1265%) hue-rotate(347deg) brightness(98%) contrast(94%);

    //filter: invert(0.5) sepia(1);

}

.k-level-1 {

    padding-left: 20px;

    filter: brightness(0%);

    &:hover{

        filter: invert(48%) sepia(88%) saturate(1265%) hue-rotate(347deg) brightness(98%) contrast(94%);

    }

}

.k-level-1-selected {

    padding-left: 20px;

    filter: invert(48%) sepia(88%) saturate(1265%) hue-rotate(347deg) brightness(98%) contrast(94%);

}

$image-height: 30px;

.image-logo {

    height: $image-height;

}

.image-logo img {

    height: $image-height;

} 

$mat-card-header-size: 40px !default;

.image-avatar {

    height: $mat-card-header-size;

    width: $mat-card-header-size;

    border-radius: 50%;

    flex-shrink: 0;

    // Makes `<img>` tags behave like `background-size: cover`. Not supported

    // in IE, but we're using it as a progressive enhancement.

    object-fit: cover;

}

.k-level-2 {

    padding-left: 40px;

}

.k-level-2 {

    padding-left: 60px;

    &:hover{

        fill: red !important;

    }

}

.theme-slider {

    border-right: 1px solid rgba(255, 255, 255, 0.12);

    padding-right: 15px;

}

::ng-deep .select-flags {

    position: inherit !important;

}

.hamburger-button {

    padding: 0 !important;

    margin: 0 !important;

}

.item-selected {

    color: var(--tb-kendo-primary-100);

    filter: invert(48%) sepia(88%) saturate(1265%) hue-rotate(347deg) brightness(98%) contrast(94%);

}

kendo-svgicon {

    filter: invert(0.5) sepia(1);

}

kendo-svgicon:hover {

    filter: invert(48%) sepia(88%) saturate(1265%) hue-rotate(347deg) brightness(98%) contrast(94%);

}

.drawerspan{

    color: white;

}

.drawerspan:hover {

    filter: invert(48%) sepia(88%) saturate(1265%) hue-rotate(347deg) brightness(98%) contrast(94%);

}
Adeel
Top achievements
Rank 1
 asked on 14 Apr 2024
1 answer
10 views
Why is the checkbox in @ progress/kendo angular treeview not available in Angular 17.2.0 version
Hetali
Telerik team
 answered on 12 Apr 2024
1 answer
15 views
I am presently utilizing a MultiSelectTree to display an extensive hierarchical dataset. Despite employing load on demand, performance suffers notably when a single level contains numerous elements.

I have come across a solution tailored for the TreeView to address this concern, wherein a limit for elements per level can be set, accompanied by a "load more" button once the limit is reached.

Is there a way to adapt this solution for the MultiSelectTree? Alternatively, are there other remedies available for optimizing performance with the MultiSelectTree?
Yanmario
Telerik team
 answered on 12 Apr 2024
1 answer
12 views
  <kendo-window title="Select Item" [width]="800" [height]="500" *ngIf="opened" (close)="windowClose()">
        <kendo-grid
          kendoGridSelectBy="id"
          [kendoGridBinding]="KendoWindowData$ | async"
          [filterable]="true"
          [sortable]="true"
          [height]="400"
          [selectable]="selectableSettings"
          (selectionChange)="onSelectionChange($event, grid)"
          [(selectedKeys)]="mySelection">
          <ng-template kendoGridToolbarTemplate>
            <kendo-grid-checkbox-column [showSelectAll]="true" [width]="40"></kendo-grid-checkbox-column>
          </ng-template>
          <kendo-grid-column [width]="40"> </kendo-grid-column>
          <kendo-grid-column field="innerCode" title="შიდა კოდი" [width]="250" [filterable]="true"></kendo-grid-column>
          <kendo-grid-column field="name" title="სახელი" [width]="250" [filterable]="true"></kendo-grid-column>
          <kendo-grid-column field="barcode" title="Barcode" [width]="250" [filterable]="true"></kendo-grid-column>
        </kendo-grid>
        <button (click)="confirmSelection(grid)" kendoButton>Confirm Selection</button>
      </kendo-window> on here how to disable checked checkbox if it possible ?
Hetali
Telerik team
 answered on 11 Apr 2024
1 answer
9 views
Hi Team,

Is there a possibility to render form PDF on a PDF Viewer. Also Need a option to do digital signature on the PDF form


Regards,
Christo
Zornitsa
Telerik team
 answered on 11 Apr 2024
1 answer
8 views

Hello everyone

I would like to persist the selection of columns in a kendo treelist, such that when a user reloads the page their selection of columns remains the same.

Is there a way of hooking into the events that take place when a selection is applied?

For example, in the picture attached, if the user were to select to display 'Description Two' and hit apply, then I would like for all three columns to be displayed on next reload. Likewise if a user were to hide both Description columns, then only the 'Name' column would be displayed on next reload. All three would still show up in the column chooser in this example, just that two of them would be turned off.

What might I do to achieve this in Angular15?

Best regards

Martin
Telerik team
 answered on 11 Apr 2024
1 answer
5 views

Hi there,

I am new to Kendo UI Charts. Am I getting this right? The navigator is only for stock charts?
I don't get why, this would also be very helpfull for line charts. I could only find a very old question regarding this, with not a really good answer.

Is it still the case that there is no way to display a line chart with a navigator? Or is it possible to display a line in the stockchart kind of similar to a line chart instead of candlesticks?

Best Regards,

FirestormHell

Yanmario
Telerik team
 answered on 11 Apr 2024
1 answer
4 views
@Component({
selector: 'my-app',
template: `
 <kendo-combobox [data]="listItems">
   <ng-template kendoComboBoxNoDataTemplate>
     <h4>No data!</h4>
   </ng-template>
 </kendo-combobox>
`
})
class AppComponent {
  public listItems: Array<string> = [];
}





<ng-template kendoComboBoxNoDataTemplate>
                            <kendo-textarea  placeholder="Enter text here." [rows]="4"  resizable="both"
                                formControlName="name">
                            </kendo-textarea>
                        </ng-template>
but showing like this. is this kendo-textarea can we show properly in this template.
Hetali
Telerik team
 answered on 10 Apr 2024
7 answers
1.1K+ views

I have seen following example https://www.telerik.com/kendo-angular-ui/components/tooltip/templates/ which shows how to use a template to render custom content for a tooltip, however it only shows very basic example of passing an "anchor" to the template, I would like to pass in a variable to the template, how do I do that?

In below example, I would like to pass the dataItem from within a ngFor to the template so that I can render custom tooltip content based on the data in dataItem,

<ng-template #approvalColTooltipContentTemplate let-dataItem>
{{dataItem | json}}
</ng-template>

 

<div *ngFor="let dataItem of dataItems">
      <div kendoTooltip filter=".gridTooltip" [ tooltipTemplate]="approvalColTooltipContentTemplate">
           <span class="gridTooltip"><span class="k-icon warningGreen"></span></span>
           <span class="gridTooltip"><span class="k-icon warningOrange"></span></span
           <span class="gridTooltip"><span class="k-icon k-i-warning"></span></span>
      </div>
</div>
 

 

Thanks

Zornitsa
Telerik team
 answered on 05 Apr 2024
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?