dygraph - color labels and scale of both axes.



  • How can we change the color of the labels/scale of the x- and y-axis? I have a dark background and the black labels are almost not visible.

    2021-01-11 16_25_50.png image url)



  • Hi Kris,

    thanks for asking this question. It is possible to change the color of axes labels by introducing CSS style - see Dygraph doc: https://dygraphs.com/css.html

    In order to make it running with REXYGEN HMI follow these instructions and see also example attached - dygraph-axis-label-css.zip

    • Create "CUSTOM" directory in hmisrc directory
    • Create "css" directory in "CUSTOM" directory
    • Create CSS file in "css" directory with following naming convention: "anyName".css
    • Paste following code (it will change color of x and y labels to yellow):
    .dygraph-axis-label-x{
    	color:yellow;
    }
    
    .dygraph-axis-label-y{
    	color:yellow;
    }
    
    • Open your *.hmi.svg file containing the TRND component
    • Open Configuration dialog (Ctrl + E) and manually fill all used libraries in most cases GENERAL and CUSTOM. Be sure to include all of them - e.g. if you use any component from HVAC library, add line containing HVAC.

    f4feda21-e855-4d4e-b81f-983e0118d6fd-image.png

    If you need any assistance, let me know.

    Cheers,
    Tomas



  • Hi Tomas,

    Thanks for the swift reply, it's working like a charm..... and we learned again something 🙂

    f2a242d1-b56c-4451-abc0-bf2400c4044b-image.png

    Grtz,

    Kris



  • Awesome! Thanks for feedback 😉

    Cheers,
    Tomas