Measure axis - limit tick values

后端 未结 3 1694
孤街浪徒
孤街浪徒 2021-01-26 02:17

I have chart looking like that:

\"Chart\"

I use measure axis for Y:

y = myChart.addMeasureAxis(         


        
3条回答
  •  孤城傲影
    2021-01-26 02:47

    I'm afraid overriding minimum axis values is a little suboptimal at the moment. There is a workaround but it's a bit of a hack. Basically you just hide the x axis entirely and draw a second chart with no series over the top, hiding the second chart's y axis.

    So after drawing do:

    c2 = new dimple.chart(svg, data);
    c2.addCategoryAxis("x", "Day");
    c2.addMeasureAxis("y", "Value").hidden = true;
    c2.draw();
    

    The two axes meet up nicely and look the way you would want.

    Here is a working example:

    http://jsfiddle.net/87GHM/2/

提交回复
热议问题