Skip to content

Y axes are weird with different x-axis values #2229

@kaankilic

Description

@kaankilic
const tickValues = val.series[0].values.map((o,i)=>o.x/1000);  // something like["0.10","0.20"] etc.
            nv.addGraph(() => {
                var height = 300;
                var chart = nv.models.multiChart().legendRightAxisHint("").useInteractiveGuideline(true).showLegend(false).height(height);
                chart.options({
                    hideY2:true
                });
                chart.xAxis.axisLabel('Date').tickValues(tickValues).tickFormat(function(d) {
                    return d3.time.format('%x')(new Date(d))
                });
                chart.yAxis1.axisLabel('Orders').tickFormat(d3.format('.02f'));
                chart.yAxis2.tickFormat(d3.format('.02f'));
                //              chart.yAxis2.tickFormat(d3.format('.02f'));
                this.redraw(chart)
                this.chartRef = chart
            });

MAzWN

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