Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
Plotline to touch the yaxis

I am trying to get plot a chart like below using highcharts. line chart with plot lines my attempt was here jsfiddle (ignore the marker symbol) enter image description here

 Highcharts.chart("container", {
  chart: {
    spacing: [50, 30, 30, 30],
  },
  title: {
    text: "",
  },
  xAxis: {
    categories: [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Oct",
      "Nov",
      "Dec",
    ],
    plotLines: [
      {
        value: 3,
        dashStyle: "dash",
        color: "red",
        label: {
          text: "Plot line",
          rotation: 0,
          y: -10,
        },
      },
    ],
  },

  yAxis: {
    lineWidth: 1,
    startOnTick: false,
  },

  series: [
    {
      data: [
        29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1,
        95.6, 54.4,
      ],
    },
    {
      name: "target",
      showInLegend: false,
      marker: {
        enabled: true,
        symbol: "triangle",
        fillColor: "red",
        height: 50,
        width: 50,
      },
      data: [null, null, null, 180],
    },
    {
      showInLegend: false,
      data: [180, 180, 180, 180],
      color: "red",
      dashStyle: "dash",
      lineWidth: 1,
      marker: {
        enabled: false,
      },
      enableMouseTracking: false,
      states: {
        inactive: {
          enabled: false,
        },
      },
      pointPlacement: "on",
    },
  ],
});

As you can see Plotline on the xAxis is fine, but on yAxis it should be only till the point and I was not able to do it with the plotlines and I added series with multiple points with mousetracking=false. Issue is I am not able the get that series line to start at yAxis (part highlighted in rectangle). Any help is appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can add a next dummy point with defined x position:

data: [{
  x: -1,
  y: 180
}, 180, 180, 180, 180],

and set the xAxis.min as 0.

Demo: https://jsfiddle.net/BlackLabel/2kvsgfd4/

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda