Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

213
Visualizações
How to add dots to Highcharts legend and bars?

Right now, my bar and legend looks like this. It is just a single color.

My Bar My legend ticker

However, I am trying to add a pattern that does not exist within the default pattern fills. I want it to look like this.

Wanted pattern fill for bar

Wanted pattern fill for legend

I have looked quite a bit online, but can't seem to find anything to help me here. I have both an SVG and PNG for the pattern. Can anyone help me?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

<script src="https://code.highcharts.com/modules/pattern-fill.js"></script>

 series: [{
    showInLegend: true,
    type: 'bar',
    color: {
      pattern: {
        image: 'https://freesvg.org/img/dot-seamless-pattern.png',
        width:150,
        height:150
      }
    },

You can set an image as a pattern anywhere you can use a color. I used a png here, but I would recommend an svg.

https://jsfiddle.net/blaird/2jwL13oc/1/

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda