How to make the Highcharts chart always show Plotlines?

Asked

Viewed 577 times

3

I would like to know how to make the chart based on the value of PlotLines, without setting a minimum and maximum size for the chart. For example, I have an X-axis pro Plotline of value 30 and another Y-axis pro of value 70. I did not set maximum or minimum value for the graph, but when I have a point for example, with the axes smaller than the value of Plotlines, it does not display.

Does anyone know how to solve?

Note: Use of Graphic Scatter

Below is the code of the X and Y axes:

xAxis: {
            title: {
                enabled: true,
                text: 'Audit e DDD'
            },
            //max: 200,
            //min: -200,
            //startOnTick: true,
            //tickInterval: 50,                
            //endOnTick: true,                
            showLastLabel: true,
            gridLineWidth: 1,
            plotLines:[{
                value: 70,
                color: 'red',
                width: 1,
                label:{
                    text: '70',
                    align: 'left'
                }
            }] 
        },
        yAxis: {
            title: {   
                enabled: true,             
                text: 'Visitação e conhecimento'
            },
            //max: 200,
            //min: -200,
            //startOnTick: true,
            //tickInterval: 50,                
            //endOnTick: true,                
            showLastLabel: true,
            plotLines:[{
                value: 30,
                color: 'blue',
                width: 1,
                label:{
                    text: '30',
                    align: 'left'

                }                    
            }]                
        },
  • Post the code you’ve already tried, help us help you.

  • @Marconi I put the X and Y axis code.

  • What kind of chart have you used?

  • @Marconi I use the Scatter

1 answer

1

RESOLVED

I solved the problem by adding an initial series, since my data is dynamic, setting the values of the axes that correspond to each value of plotLine, a pro X and another pro Y, so it will always load the graph with the plotLines defined.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.