Dhx_diagram_line_title__text set background-color: rgb(255, 255, 255) I want it trasparent

When load my Json Diagram dhx_diagram_line_title__text has background-color: rgb(255, 255, 255);
But I would like it to bee trasparent.
Why is it set to white ? Where I should change this parameter ?
This is my record

{“type”:“lineTitle”,“text”:“NO”,“distance”:34.67336683417086,“parent”:“u1742898821519”,“id”:“u1742901260451”,“editable”:true,“fixed”:false,“autoPosition”:false,“fill”:“#FFFFFF”,“lineHeight”:14,“fontSize”:14,“fontColor”:“#4C4C4C”,“fontStyle”:“normal”,“fontWeight”:“normal”,“textAlign”:“center”,“width”:20,“height”:16}

Please, try to use

fill: "#FFFFFF00"

like:

{
    “type”:“lineTitle”,
    “text”:“NO”,
    “distance”:34.67336683417086,
    “parent”:“u1742898821519”,
    “id”:“u1742901260451”,
    “editable”:true,
    “fixed”:false,
    “autoPosition”:false,

    “fill”:“#FFFFFF00”,

    “lineHeight”:14,
    “fontSize”:14,
    “fontColor”:“#4C4C4C”,
    “fontStyle”:“normal”,
    “fontWeight”:“normal”,
    “textAlign”:“center”,
    “width”:20,
    “height”:16
}

ok thanks it solved, and how can i add an image instead of a text ?

Do you need to add the image to the lineTitle or to your diagram as a new shape?

If you are meaning the lineTitle element - it is not available to use the image instead of text for it.
What about usage of image as a shape, you may create your own custom shape template with the needed html-content and use it in your diagram.

Here you can find a detailed tutorial:

containing some examples.

You need to define your shape template with the addShape() method:

Here you can find some predefined examples of the custom shapes:
https://snippet.dhtmlx.com/u1xqyo9w?mode=wide
https://snippet.dhtmlx.com/oviq2eu3?mode=wide
https://snippet.dhtmlx.com/madymxt5?mode=wide
https://snippet.dhtmlx.com/k5vlvj8i?mode=wide

1 Like