Is there a way to keep connectors visible even without hover the diagram shape?

2 Answers 80 Views
Diagram
Rodrigo
Top achievements
Rank 1
Iron
Rodrigo asked on 28 Apr 2021, 08:38 PM

Get the example diagram in https://dojo.telerik.com/oNOJidug from example in Diagram Connections page reference

With the basic configuration:


$("#diagram").kendoDiagram({
    shapes:[
      {
        id:"1",
        content:{
          text: "State 1"
        },
        x: 20,
        y: 20
      },
      {
        id:"2",
        content: {
          text: "State 2"
        },
        x: 300,
        y: 20
      }
    ],
    connections:[
      {
        from: "1",
        to: "2",
        content: {
            text: "Step 1"
        },
        stroke: {
            color: "#33ccff"
        }
      }
    ]
  });

 

My question is, is there a way to keep the connectors of both shapes visible without need to keep mouse hover? 

 

I want this:

instead of:

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Rodrigo
Top achievements
Rank 1
Iron
answered on 05 May 2021, 08:35 PM

I had more work to do that, but I can create an workaround by just adding a visual template function to "shapeDefaults" where I can create an rectangle/circle in the same position of connectors, and make connectors invisible with width: 0, so visibly, the "connectors" are always shown.

 

 

Nikolay
Telerik team
commented on 10 May 2021, 02:32 PM

Hi Rodrigo,

That is a valid solution to this specific scenario. Feel free to share the code with the community so others can also benefit from it.

Bets regards,

Nikolay

0
Nikolay
Telerik team
answered on 03 May 2021, 09:21 AM

Hello Rodrigo,

I am afraid the current API does not allow such configurations and furthermore, the connectors are designed to show only when a shape gets hovered. 

If this is an important feature for you I suggest submitting a feature request in the Feedback portal. We regularly monitor the items and those that gain lots of popularity are usually included in the RoadMap.

Regards,
Nikolay
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Diagram
Asked by
Rodrigo
Top achievements
Rank 1
Iron
Answers by
Rodrigo
Top achievements
Rank 1
Iron
Nikolay
Telerik team
Share this question
or