简体   繁体   中英

Kendo Chart: Log Y-Axis Major Tick label issue

I am using Kendo Chart for plotting data points using Scatter Line chart with dual Y - Axis & both X/Y axis of type "LOG" scale.

Everything were working fine in all browsers until today, I noticed in Chrome browser ONLY - Y axis scale starts with 0.000009999999999999 (instead of 0.00001). please find attached screenshot.

在此处输入图片说明

This rendering issue is not happening for other Y-axis. Before rendering I am setting axes MIN/MAX/AXISCROSSINGVALUE for each axes.

Also, please suggest alternative method for formatting Y-Axis tick label.

You can use a function for plotting the scale. Add the function to you axis data.

yAxis: {
            name: " name",
            title: {
                text: "bla",
                font: "10px Open Sans",
                color: "#4D4D4D"
            },
            labels: {
                format: "{0:N0}"
            },
            min: 10,
            max: 10000,
            type: "log",
            data: mySequence()
        },

Then you function can be a simple loop (this is just a example i´ve made)

 function mySequence() {
        var arr = [];
        var n = 1;
        while (n < 10000) {
            n = n * 10;
            arr.push(n);
        }            
        return arr;
    }

mind the type: "log" definition since it´sa logarithmic scale

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM