Domanda

Marketing has handed down a desired graph look and feel without asking for the capabilities of Dataviz. I'm kendo Bullet Graph type "verticalBullet". Is there a way to Change the Target line to a a dotted line?

I tried setting dashType = "dot"

Here is the script I'm trying that doesn't work:

        $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");

Any help would be greatly appreciated.

È stato utile?

Soluzione

You can use the border of the target:

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

Here is a live demo: http://jsbin.com/AreqameT/1/edit

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top