猿问

FusionMaps XT - VueJs - 不工作事件连接器点击

我有一张用 VueJS 处理的地图,但我遇到了事件 connectorClick 的问题。在下面的示例中,当单击连接线时,警报不起作用。


Vue.use(VueFusionCharts, FusionCharts);

let grphMap = new Vue ({

  el: '#app-vue',

  data: {

      type: "maps/romania",

      width: "800",

      height: "600",

      dataFormat: "json",

      dataSource: {

        'chart': {

          "theme":                "fusion",

          "nullEntityColor":      "#E5E5E9",

          "entityFillHoverColor": "#99ccff",

          "showLabels":           '1',

          "showEntityHoverEffect": "1",

          "showtooltip":          "1",

          "connectorColor":       "#0CB2B0",

          "connectorHoverColor": "#000000",

          "connectorthickness":   "3",

          "markerfontsize":       "18",

          "markerfontcolor":      "#0a0a0a",

      "numbersuffix":         "%",

          "entityFillColor":      "#ff0000",

          "markerBgColor":        "#FF0000",

          "markerRadius":         "12",

      },

        "colorrange": {

          "gradient": "0",

      },

        "data": [

          {

            id: '10',

            color: "#74CCEB",

          }

      ],

        "markers": {

          "shapes": [

              {

               "id": "myCustomShape",

               "type": "circle",

               "fillcolor": "#f8bd19",

               "showborder": "0"

              }

          ],

          "items": [

              {

                shapeid: "myCustomShape",

                id: "10",

                x: "295.5",

                y: "283.5",

              },

              {

                shapeid: "myCustomShape",

                id: "11",

                x: "323.9",

                y: "226.6",

              }

              }

          ]

       }

      },

https://jsfiddle.net/Hexman/5e61pu3r/25

我找到了一个功能示例,但它不在 VueJs http://jsfiddle.net/fusioncharts/t226vxnp/

不要把我错在哪里的马鞍给我?


慕森王
浏览 145回答 1
1回答

侃侃无极

似乎您忘记在您fusioncharts在组件数据中定义的模板中绑定事件对象。请参考以下模板代码:<fusioncharts&nbsp; :type="type"&nbsp; :width="width"&nbsp; :height="height"&nbsp; :dataFormat="dataFormat"&nbsp; :dataSource="dataSource"&nbsp; :events="events" // Bind your events object></fusioncharts>
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答