Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use graphics.js with Angular 6? #8

Open
abudarevsky opened this issue Jul 25, 2018 · 11 comments
Open

How to use graphics.js with Angular 6? #8

abudarevsky opened this issue Jul 25, 2018 · 11 comments
Assignees

Comments

@abudarevsky
Copy link

abudarevsky commented Jul 25, 2018

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

@loki20beta
Copy link
Contributor

@abudarevsky we will look into it and get back to you

@Shestac92 Shestac92 self-assigned this Aug 7, 2018
@Shestac92
Copy link

@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.

@Shestac92
Copy link

@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);
}

@arunmmanoharan
Copy link

@Shestac92 Does the link for the ts file work?

@Shestac92
Copy link

Shestac92 commented Oct 23, 2018

@a2441918 Please, use this link to get the latest graphics.d.ts

@jchatkinson
Copy link

@Shestac92 the link seems to be broken

@Shestac92
Copy link

@jchatkinson
Thank you for pointing me at this fact!
Very soon I will provide the correct link.

@ghost
Copy link

ghost commented Sep 13, 2019

Any news on this? both of links are broken!

@Shestac92
Copy link

@pouya-daneshvar-freelands-it
Use the link to download the index.d.ts file for GraphicsJS.

@vincent1981
Copy link

Any news on this? both of links are broken!

@decfrr
Copy link

decfrr commented Nov 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants