【问题标题】:Using Kendo Bullet Graph how to change the target line to a dotted line?使用 Kendo Bullet Graph 如何将目标线更改为虚线?
【发布时间】:2014-01-03 16:03:24
【问题描述】:

市场营销部门在不要求 Dataviz 功能的情况下传递了所需的图形外观和感觉。我是剑道子弹图类型“verticalBullet”。有没有办法将目标线更改为虚线?

我尝试设置 dashType = "dot"

这是我正在尝试但不起作用的脚本:

        $barChart = $("#bar-chart").empty();

        $barChart.kendoChart({
            theme: global.app.chartsTheme,
            renderAs: "svg",
            legend: {
                position: "bottom"
            },
            seriesDefaults: {
                type: "column"
            },
            series: [
                {   
                    type: "verticalBullet",
                    currentField: "score",
                    targetField: "average",
                    target: {
                        color: "#444",
                        dashType: "dot",
                        line: {
                          width: 1,
                        }
                    }
                    data: [
                       {
                            score: 93.7,
                            average: 65.2,                              
                        }, {
                            score: 80.2,
                            average: 22.2,
                        }, {
                            score: 60.8,
                            average: 35.2,
                        }, {

                            score: 82.1,
                            average: 45.2,                                
                        }, {
                            score: 74.2,
                            average: 55.2,
                        }
                    ]
                }
            ],
            categoryAxis: {
                labels: { rotation: -45 },
                categories: ["Sales & Contracting", "Implementation & Training", "Functionality & Upgrades", "Service & Support", "General"],
                line: {
                    visible: false
                },
                color: "#444", 
                axisCrossingValue: [0, 0, 100, 100]
            },
             tooltip: {
                visible: false
            }
        }).data("kendoChart");

任何帮助将不胜感激。

【问题讨论】:

    标签: javascript kendo-ui kendo-mobile kendo-dataviz


    【解决方案1】:

    你可以使用目标的边框:

      target: {
        color: "transparent",
        border: {
          width: 2,
          dashType: "dot",
          color: "#444"
        },
        line: {
          width: 0
        }
      }
    

    这是一个现场演示:http://jsbin.com/AreqameT/1/edit

    【讨论】:

    • 谢谢!这很有帮助。
    猜你喜欢
    • 1970-01-01
    • 2014-01-21
    • 1970-01-01
    • 1970-01-01
    • 2012-10-25
    • 1970-01-01
    • 2022-09-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多