How to make the Highcharts chart always show PlotLines?

3

I'd 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 a PlotLine for the X-axis of value 30 and another for the Y-axis of value 70. I did not set a maximum or minimum value for the graph, but when I have a dot, for example, with the axes smaller than the PlotLines value, it does not display.

Does anyone know how to solve it?

Note: I use the Scatter

The following is the code for 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'

                }                    
            }]                
        },
    
asked by anonymous 17.11.2015 / 17:19

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 the plotLine, one pro X and another pro Y, so it will always load the graph with the plotLines defined.

    
18.11.2015 / 18:42