2016-11-11 16 views
3

私は単純なデータを表示するために使用しているパイのZingChartを持っています。それは、角度を使用していることが起こり、ユーザーがドリルダウンするときにシリーズオブジェクトを更新します。ZingChart pieツールチップが表示されない

ツールチップが表示されない以外はすべて正常に動作していますか?インタラクションや系列割り当てに関係なく、表示されません。標準的なマウスオーバーでは作業が強調され、ノードをクリックするとうまくいきますが、ツールチップは表示されません。何か案は?私が行方不明のものを解決することはできません! Heres what it looks like 私のチャートの設定は次のとおりです。

{ 
     type: "pie", 
     id: 'chart-1', 
     title: { 
      textAlign: 'center', 
      text: "Loading..." 
     }, 
     "legend":{ 
      "border-width":1, 
      "border-color":"gray", 
      "border-radius":"5px",    
      "marker":{ 
      "type":"circle" 
      }, 
      "toggle-action":"remove", 
      "icon":{ 
      "line-color":"#9999ff" 
      } 
     }, 
     "plot": { 
      "animation":{ 
      "on-legend-toggle": true, 
      "effect": 5, 
      "method": 1, 
      "sequence": 1, 
      "speed": 0.7 
      }, 
      "value-box": { 
      "text": "$%v", 
      "negation": "currency", 
      "thousands-separator": ",", 
      "font-color": "black", 
      "placement":"in", 
      "offset-r":"50%", 
      "font-size":"12"    
      }, 
      "tooltip":{ 
      "text":"%t: %v (%npv%)"     
      }, 
      "decimals": "0", 
      "detach": false 
     }, 
     series: [], 
     shapes: [{ 
      type: 'triangle', 
      backgroundColor: '#66ccff', 
      size: 10, 
      angle: -90, 
      x: 20, 
      y: 20, 
      cursor: 'hand', 
      id: 'backwards' 
     }] 
     }; 

答えて

4

chart-1-は、私たちのパース/セレクタープロセスで問題を引き起こしています。 idchart_1に変更すると、すべて正常に動作します。

var myConfig = { 
 
"graphset":[ 
 
    { 
 
     "type":"pie", 
 
     "id":"chart_1", 
 
     "title":{ 
 
      "textAlign":"center", 
 
      "text":"Loading..." 
 
     }, 
 
     "legend":{ 
 
      "border-width":1, 
 
      "border-color":"gray", 
 
      "border-radius":"5px", 
 
      "marker":{ 
 
       "type":"circle" 
 
      }, 
 
      "toggle-action":"remove", 
 
      "icon":{ 
 
       "line-color":"#9999ff" 
 
      } 
 
     }, 
 
     "plot":{ 
 
      "animation":{ 
 
       "on-legend-toggle":true, 
 
       "effect":5, 
 
       "method":1, 
 
       "sequence":1, 
 
       "speed":0.7 
 
      }, 
 
      "value-box":{ 
 
       "text":"$%v", 
 
       "negation":"currency", 
 
       "thousands-separator":",", 
 
       "font-color":"black", 
 
       "placement":"in", 
 
       "offset-r":"50%", 
 
       "font-size":"12" 
 
      }, 
 
      "decimals":"0", 
 
      "detach":false 
 
     }, 
 
     "tooltip":{ 
 
      "text":"%t: %v (%npv%)" 
 
     }, 
 
     "series":[ 
 
      { 
 
       "values":[118], 
 
       "text":"0-30" 
 
      }, 
 
      { 
 
       "values":[118], 
 
       "text":"0-30" 
 
      }, 
 
      { 
 
       "values":[118], 
 
       "text":"0-30" 
 
      } 
 
     ], 
 
     "shapes":[ 
 
      { 
 
       "type":"triangle", 
 
       "backgroundColor":"#66ccff", 
 
       "size":10, 
 
       "angle":-90, 
 
       "x":20, 
 
       "y":20, 
 
       "cursor":"hand", 
 
       "id":"backwards" 
 
      } 
 
     ] 
 
    } 
 
] 
 
}; 
 

 
zingchart.render({ 
 
\t id: 'myChart', 
 
\t data: myConfig, 
 
\t height: '100%', 
 
\t width: '100%' 
 
});
html, body { 
 
\t height:100%; 
 
\t width:100%; 
 
\t margin:0; 
 
\t padding:0; 
 
} 
 
#myChart { 
 
\t height:100%; 
 
\t width:100%; 
 
\t min-height:150px; 
 
}
<!DOCTYPE html> 
 
<html> 
 
\t <head> 
 
\t \t <script src= "https://cdn.zingchart.com/zingchart.min.js"></script> 
 
    </head> 
 
\t <body> 
 
\t \t <div id="myChart"></div> 
 
\t </body> 
 
</html>

関連する問題