Kendo线性仪表具有对数刻度

问题描述 投票:0回答:1

我需要在Kendo Linear Gauge图表中表示非线性或大范围的值,并突出显示不同的值范围并在刻度上标记多个值。挑战是小尺寸的图表,大范围或价值不会呈现/看起来不错。

http://dojo.telerik.com/@kk8322/ULokuFuZ

我准备切换到任何其他javascript图表库(最好是Highcharts / Kendo图表)来获取此行为。

javascript charts highcharts kendo-chart
1个回答
0
投票

您需要设置仪表区域的宽度。 API Reference for it.

<script>
                $(document).ready(function() {
                    $("#gauge").kendoLinearGauge({                        
                 gaugeArea:{
                     width:500
                 },         
                 pointer: [{
                    value: 670000,
                    shape: "arrow",
                    color: "black"
                }, {
                    value: 480000,
                    color: "blue",
                    shape: "arrow"
                }, {
                    value: 570000,
                  size: 15,
                    color: "blue",
                    shape: "arrow"
                }],

                        scale: {
                            min: 470000,
                            max: 770000,
                            vertical: false,
                            ranges: [{
                                    from: 470000,
                                    to: 470500,
                                    color: "#c20000"
                                },{
                                    from: 470500,
                                    to: 471000,
                                    color: "yellow"
                                }, {
                                    from: 771500,
                                    to: 770500,
                                    color: "yellow"
                                }, {
                                    from: 770500,
                                    to: 770000,
                                    color: "#c20000"
                                }]
                        }
                    });
                });
            </script>
© www.soinside.com 2019 - 2024. All rights reserved.