Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

MultiBar Chart Yaxis Range is set to Lowest varying variableSet #94

Open
U-Tyagi opened this issue Jun 9, 2020 · 0 comments
Open

MultiBar Chart Yaxis Range is set to Lowest varying variableSet #94

U-Tyagi opened this issue Jun 9, 2020 · 0 comments

Comments

@U-Tyagi
Copy link

U-Tyagi commented Jun 9, 2020

MyData:

[
        {
            values: Rdata,
            key: 'Rain (mm)',
            color: '#04a9f5',
            // area: true
        },
        {
            values: Hdata,
            key: 'Humidity %',
            color: '#A389D4'
        },
        {
            values: Tdata,
            key: 'Temperature (C)',
            color: '#ff9633',
        }
]

Rdata, Hdata, Tdata are arrays like: [{'x': new Date(dateStr), 'y': 10},{..},....]
React-nvd3 Code:

React.createElement(NVD3Chart, {
                        xAxis: {
                            tickFormat: function (d) { return d3.timeFormat('%d%bT%H%M%Z')(new Date(d));; },
                            axisLabel: 'Timestamp'
                        },
                        yAxis: {
                            axisLabel: 'Parameter',
                            tickFormat: function (d) { return d3.format(',.2f')(d); },
                            
                        },
                        type: 'multiBarChart',
                        datum: data,
                        x: 'x',
                        y: 'y', 
                        rotateLabels:-5,
                        showControls: false,
                        groupSpacing: 0.2,
                        duration: 350,
                        useInteractiveGuideline: true,
                        height: 300,
                        renderEnd: function () {
                            console.log('renderEnd');
                        }
                    })

It always set Yaxis range as per lowest varying VaribleArray i.e. Rdata; You can see the image
1

Rdata[ ] varies 0-9
Hdata[ ] varies 0-95
Tdata[ ] varies 0-48

Why Y-axis is displayed up to 9 only and not upto max Y value in the datum array. Any help/ signals would be appreciated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant