我试图使用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