Telerik Forums
Kendo UI for jQuery Forum
1 answer
57 views

Hello,

 

I'm creating a diagram. I've done some research on how to create a custom shape, but I'm having a few problems on dynamically modifying the data of the various elements present in the shape.

1) Firstly, I've understood the code bellow that allows me to create a custom shape:

 

let newShape = function() {
            let dataviz = kendo.dataviz
            let g = new dataviz.diagram.Group()
            let dataItem = options.dataItem

            g.append(new dataviz.diagram.Rectangle({
                width: 210,
                height: 75,
                stroke: {
                    width: 0
                },
                fill: {
                    gradient: {
                        type: 'linear',
                        stops: [{
                            color: dataItem.colorScheme,
                            offset: 0,
                            opacity: 0.5
                        }, {
                            color: dataItem.colorScheme,
                            offset: 1,
                            opacity: 1
                        }]
                    }
                }
            }))
            
            g.append(new dataviz.diagram.TextBlock({
                text: dataItem.name,
                x: 20,
                y: 20,
                fill: '#fff'
            }))
            
            g.append(new dataviz.diagram.TextBlock({
                text: dataItem.props,
                x: 20,
                y: 40,
                fill: '#fff'
            }))
            return g
}

However,  I'm having trouble dynamically modifying the value of a TextBlock. 

 

Which field do I need to access, after retrieving the shape via diagram.shapes[i] , to be able to modify the "text" field of a TextBlock? Or, more generally, how can I easily retrieve an element (TextBlock, etc.) from a compound shape?

 

I've tried accessing various fields in the shape object referring to the TextBlock element and then calling shape[i].redraw( ) / .redrawVIsual( ), but no shape is updated.

 

2) Secondly, what kind of components can be added to the Group ? My goal is to add a progress bar into my shape, but I don't think that's possible. Is there a list of elements (TextBlocks, ...) that can be appended to Group ? Or any idea to have a progress bar in a shape ? Maybe using the progressbar component and attach a progress bar to each shape ? 

 

Thanks in advance, 

 

Best,

VB

Neli
Telerik team
 answered on 10 Aug 2023
1 answer
232 views

Hello,

I want to show a percentage using a kendo JQuery progress bar (min: 0, max: 1.0), but percentage value can be greater than 1.0

If percent value is 1.2 then I need that progress bar show the progress bar full filled in red background color, but "120%" as value.

Now, progress bar shows 100% instead of 120%

Thanks

Neli
Telerik team
 answered on 16 Aug 2022
13 answers
855 views
The ProgressBar documentation has only 2 documented methods (enable and value).

Is there a way to change the ProgressBar Min and Max value after the widget initial configuration?
Robert
Top achievements
Rank 2
 answered on 05 Mar 2019
3 answers
828 views

Hi,ProgressBar with type="percent" round 99.99 to 100%, need math.floor to 99% or 99.99%

https://dojo.telerik.com/OqeqAkOV/2

Ivan Danchev
Telerik team
 answered on 26 Sep 2018
4 answers
669 views

HI Team,

Inside a Kendo Tree List for Angular Js I have added a Progress Bar as a kendo template.

 

<script id="progressStatus" type="text/x-kendo-template">

<div ng-if="'#:Status#' == 'Loading'">

    <div kendo-progress-bar="progressBar1" k-min="0" k-max="100" k-value="#:Percentage#" style="width: 100%;">

    </div>

</div>

</script>

 

And I bind it to the tree list as part of column declaration

{ field: "Status", template: $("#progressStatus").html(), width: "170px" }

So far good. And I am able to display the value in UI.

However I am not sure how to show following

  • How to make it of type percent, i tried with k-type='percent' but no luck
  • If Percentage > 50 show the graph in yellow and text (50%) in red

Thanks

Inside a Kendo Tree List for Angular Js I have added a Graph as a kendo template.

    <script id="progressStatus" type="text/x-kendo-template">
                    <div ng-if="'#:Status#' == 'Loading'">
                        <div kendo-progress-bar="progressBar1"  k-min="0" k-max="100" k-value="#:Percentage#" style="width: 100%;"></div>
                    </div>
    </script>

And I bind it to the tree list as part of column declaration

{ field: "Status", template: $("#progressStatus").html(), width: "170px" }

So far good. And I am able to display the value in UI.

However I am not sure how to show following

  • How to make it of type percent, i tried with k-type='percent' but no luck
  • If Percentage > 50 show the graph in yellow and text (50%) in red

Inside a Kendo Tree List for Angular Js I have added a Graph as a kendo template.

    <script id="progressStatus" type="text/x-kendo-template">
                    <div ng-if="'#:Status#' == 'Loading'">
                        <div kendo-progress-bar="progressBar1"  k-min="0" k-max="100" k-value="#:Percentage#" style="width: 100%;"></div>
                    </div>
    </script>

And I bind it to the tree list as part of column declaration

{ field: "Status", template: $("#progressStatus").html(), width: "170px" }

So far good. And I am able to display the value in UI.

However I am not sure how to show following

  • How to make it of type percent, i tried with k-type='percent' but no luck
  • If Percentage > 50 show the graph in yellow and text (50%) in red
Kerry
Top achievements
Rank 1
 answered on 04 Aug 2017
1 answer
387 views
How do i move the progress status text so that it will be displayed over the colored part of the bar.  Also is there a way to display the max value of the bar?
Ianko
Telerik team
 answered on 28 Jun 2017
2 answers
85 views

Hello.  How can I access the progressStatus field when using MVVM?  Dojo: http://dojo.telerik.com/uzawo.

Thank you.  

John
Top achievements
Rank 1
 answered on 22 Mar 2017
3 answers
297 views

Hi All,

I'm using a ProgressBar for a very long running process. The problem is the bar is updated quite slowly. For instance, when I've processed all of the data items (I use fields to show processed and pending items), the progress bar is showing just a 50% advance. This is more noticeable for longer data sets.

I've set the update delay to 0 (no animation).

Is there anything else I can do to speed it up?

Thank you.

Dimiter Madjarov
Telerik team
 answered on 12 Dec 2016
4 answers
207 views

Hello,

When using progress bar in chunk mode, is there a way to show a label for each chunk ?

Pascal
Top achievements
Rank 1
 answered on 04 Nov 2016
1 answer
66 views

Hi. There is an error in ProgressBarOptions definitions for value property:

interface ProgressBarOptions {
        name?: string;
        animation?: ProgressBarAnimation;
        chunkCount?: number;
        enable?: boolean;
        max?: number;
        min?: number;
        orientation?: string;
        reverse?: boolean;
        showStatus?: boolean;
        type?: string;
        value?: number;  //should be number | boolean!!!!
        change?(e: ProgressBarChangeEvent): void;
        complete?(e: ProgressBarCompleteEvent): void;
    }

Dimiter Madjarov
Telerik team
 answered on 01 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?