gemini86 / node-red-contrib-chart-image

2 stars 3 forks source link

Fonts missing #7

Open ouranos6 opened 3 years ago

ouranos6 commented 3 years ago

Hello, first of all I want to thank you for this nice piece of code :)

I ran into an issue with the graphs. As you can see in the picture below I have no texts only some squares.

image

I'am running Node Red on Ubuntu server 20.04 LTS and I have intalled it via the palette menu.

Thank's in advance for your help

ouranos6 commented 3 years ago

And here is my datas


      type: 'bar',
      data: {
          labels: ["Red", 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
          datasets: [{
            label: '# of Votes',
            data: [12, 19, 3, 5, 2, 3],
            backgroundColor: [
                'rgba(255, 99, 132, 0.2)',
                'rgba(54, 162, 235, 0.2)',
                'rgba(255, 206, 86, 0.2)',
                'rgba(75, 192, 192, 0.2)',
                'rgba(153, 102, 255, 0.2)',
                'rgba(255, 159, 64, 0.2)'
            ],
            borderColor: [
                'rgba(255, 99, 132, 1)',
                'rgba(54, 162, 235, 1)',
                'rgba(255, 206, 86, 1)',
                'rgba(75, 192, 192, 1)',
                'rgba(153, 102, 255, 1)',
                'rgba(255, 159, 64, 1)'
            ],
            borderWidth: 1
          }]
      },
    options: {
        plugins: {
               datalabels: {
                   display:true
               }
        },
        scales: {
            yAxes: [{
                ticks: {
                    beginAtZero: true
                }
            }]
        },
        legend: {
            labels: {
                // This more specific font property overrides the global property
                fontSize: 20,
                fontColor: 'black',
                family: 'Arial'
            }
        }
    }
};
return msg;
LindLena commented 2 years ago

Hello, I have got the same problem, did you find a solution? I think it´s something with the fonts, but I didn´t know, what I have to change to see the texts... Thanks in advance!

tonylee3k commented 2 years ago

Hi all, Im facing the same issue. Im running node-red on Ubuntu Core on a project and it seems like the characters are not rendered properly (empty square boxes), probably due to the fonts are not recognizable by Core. May I know if guys had found a workaround to this problem?

steve2211 commented 1 year ago

Running this line apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing libmount ttf-dejavu ttf-droid ttf-freefont ttf-liberation fontconfig or adding it to my dockerfile like this RUN apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing libmount ttf-dejavu ttf-droid ttf-freefont ttf-liberation fontconfig and rebuilding the container fixed it for me.

ouranos6 commented 1 year ago

Ok, interesting… I ´am using nodered as an addon to home assistant so I have to figure out how to do that.

But it can be worth to try.


De : steve2211 @.> Envoyé : Friday, April 14, 2023 2:29:20 PM À : gemini86/node-red-contrib-chart-image @.> Cc : ouranos6 @.>; Author @.> Objet : Re: [gemini86/node-red-contrib-chart-image] Fonts missing (#7)

Running this line apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing libmount ttf-dejavu ttf-droid ttf-freefont ttf-liberation fontconfig or adding it to my dockerfile like this RUN apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing libmount ttf-dejavu ttf-droid ttf-freefont ttf-liberation fontconfig and rebuilding the container fixed it for me.

— Reply to this email directly, view it on GitHubhttps://github.com/gemini86/node-red-contrib-chart-image/issues/7#issuecomment-1508434324, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6CJKHTYFOKLXU5GB2SE7LXBE7KBANCNFSM4SOK3KWQ. You are receiving this because you authored the thread.Message ID: @.***>

robbehaerens commented 6 months ago

run this commands "sudo apt-get update sudo apt-get install -y fonts-roboto fonts-noto fonts-cantarell"