我試圖使用Vega v3到一個非常基本的角V2骨架(使用打字稿V2和的WebPack V2),但獲得意外的行爲,我將嘗試下面解釋(從這裏我會省略版本,但參考文獻將是those specified here)。爲什麼Vega 3不適用於Angular2?
首先,捆綁的版本不是爲我工作,所以我決定在a provided example和using Vega modules directly中列出的所有依賴關係。
其次,有三個官方示例規範(first spec,second spec,third spec)用於測試描述的設置。
第三,對於每個規範運行the base Vega drawing methods chain後,結果有兩種類型:
- first spec,引發以下錯誤:
EXCEPTION: Error in ./VegaPlotComponent class VegaPlotComponent_Host - inline template:0:0 caused by: Cannot read property 'orient' of undefined
打破整個角應用程序。 Full stack trace here。 - second spec & third spec創建如圖1和圖2所示的
width="9", height="9"
SVG正方形沒有明顯的原因(2nd spec plot size,3rd spec plot size)。
- first spec,引發以下錯誤:
圖1.維加積角分量DOM片段檢查(DEV-工具)。
圖2.維加積角分量DOM片段選擇(呈現的視圖)。
那麼,爲什麼Vega 3不適用於Angular2?
您是否試過這個指令「https://github.com/limalimacharlie/ng-vega3」? –
該建議基於AngularJS(aka angular 1),並且我想使用角度2+。 – dbautistav