Open abudarevsky opened 6 years ago
@abudarevsky we will look into it and get back to you
@abudarevsky
Unfortunately, the current version of AnyChart doesn't provide typedefs for pure GraphicsJS which functions and methods are available via acgraph.***()
. Now you can use graphicsJS only as a part of AnyChart library. You should include anychart-base.min.js
and access to graphics methods and functions via anychart.graphics.***()
.
Meanwhile, our team prepares additional index.d.ts for pure GraphicsJS.
We will notify you when the update becomes available.
@abudarevsky We are glad to notify that we have prepared typedefs for graphicsJS! You can download the current version of graphicsJS.d.ts by this link.
Here are few lines how to use the graphicsJS in the Angular app:
stage: acgraph.vector.Stage = null;
ngOnInit() {
this.stage = acgraph.create(this.container.nativeElement);
this.stage.circle(50, 50, 45);
}
@Shestac92 Does the link for the ts file work?
@Shestac92 the link seems to be broken
@jchatkinson Thank you for pointing me at this fact! Very soon I will provide the correct link.
Any news on this? both of links are broken!
@pouya-daneshvar-freelands-it Use the link to download the index.d.ts file for GraphicsJS.
Any news on this? both of links are broken!
The last link mentioned is http://api.anychart.stg/si/8.3.0/graphics.d.ts
, but I was able to download the d.ts
file by replacing .stg
with .com
.
There is demo project for AnyChart intergration with angular 5, however, the same approach doesn't work for graphics.js. Attempt to import the library results in error:
core.js:1633 ERROR Error: Uncaught (in promise): ReferenceError: acgraph is not defined
installed the latest version 1.3.2 via npm