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

204
Visualizações
How to customise step line chart in Highchart?

enter image description here

I know it is weird but I want to customize step line chart like horizontal step is thicker and vertical step is thinner, is there any way to achieve this?

Thanks in advance

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

0

You can render other lines in the same positions as the horizontal ones. Please check the below solution:

    chart: {
        events: {
            render: function() {
                const points = this.series[0].points;

                points.forEach(point => {
                    const nextPoint = points[point.index + 1];
                    if (nextPoint) {
                        const d = [
                            'M',
                            point.plotX + this.plotLeft - 1,
                            point.plotY + this.plotTop,
                            'L',
                            nextPoint.plotX + this.plotLeft + 1,
                            point.plotY + this.plotTop
                        ];

                        if (point.customPath) {
                            point.customPath.attr({
                                d
                            });
                        } else {
                            point.customPath = this.renderer
                                .path([])
                                .attr({
                                    d,
                                    stroke: 'red',
                                    'stroke-width': 7
                                })
                                .add();
                        }
                    }
                });
            }
        }
    }

Live demo: http://jsfiddle.net/BlackLabel/wc5zrax9/

API Reference: https://api.highcharts.com/class-reference/Highcharts.SVGRenderer#path

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