Skip to content

d3 Error: Invalid negative value for <rect> attribute height="-2.991150442477876" #1

@whitney

Description

@whitney

Hello I'm not sure if this is a bug or if I've mis-configured something. For every member of my data set I'm getting an error like the one above.

My config is as follows:

        var config = {
            container: targetNode,
            width: 'auto',
            height: 'auto',
            margin: {top: 40, right: 60, bottom: 80, left: 80},
            type: 'bar',
            subtype: 'stacked',
            labelFormatterX: function(d){
                return d3.time.format('%e %b')(new Date(d)) + '<br>' + d3.time.format('%Y')(new Date(d));
            },
            axisXAngle: 0,
            tickSize: 10,
            minorTickSize: 5,
            fringeSize: 3,
            tickYCount: 5,
            axisXTickSkip: 4,
            gutterPercent: 10,
            renderer: 'svg',
            scaleType: 'time',
            keyX: 'x',
            keyY: 'y',
            outerPadding: 'auto',
            showFringe: true,
            showAxes: true,
            showXGrid: true,
            showYGrid: true,
            showLegend: true,
            autoTypeThreshold: 30,
            chartTitle: 'Chart title',
            axisXTitle: 'Axis X title',
            axisYTitle: 'Axis Y title',
            colorList: ['#741523', 'orange', 'lime', 'orangered', 'violet']
        };

And my data looks like:

[{"name":"histogram","values":[{"x":1433903917326,"y":941},{"x":1433903917327,"y":1017},{"x":1433903917328,"y":419},{"x":1433903917329,"y":161},{"x":1433903917330,"y":68}]}]

Any suggestions would be much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions