c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.33k stars 1.39k forks source link

Point selection with null values ​​may not be correct #2820

Open y-ota opened 3 years ago

y-ota commented 3 years ago

If selection is enabled and data contains null value, point selection ​​may not be correct. I can select the null value at 0 on Y axis.

キャプチャ2

Code

var chart = c3.generate({
    data: {
        x: 'x',
        columns: [
            ['x', '2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06'],
            ['data1', -130, 200, 100, 400, 150, 250],
            ['data2', 130, 340, 200, 500, 250, 350],
            ['data3', null, 500, 450, 700, 600, 500]
        ],
        selection: {
            enabled: true
        }
    },
    axis: {
        x: {
            type: 'timeseries',
            tick: {
                format: '%Y-%m-%d'
            }
        }
    }
});

Versions: