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

Voyager does not working with angular. #838

Open
IgorCH opened this issue Feb 19, 2019 · 2 comments
Open

Voyager does not working with angular. #838

IgorCH opened this issue Feb 19, 2019 · 2 comments

Comments

@IgorCH
Copy link

IgorCH commented Feb 19, 2019

When I doing simple example from tutorial.
`
import {AfterViewInit, Component} from '@angular/core';
import {CreateVoyager} from "datavoyager";

@component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements AfterViewInit {

constructor() {
}
ngAfterViewInit() {
const container = document.getElementById('voyager-embed');
const config = undefined;
const data: any = {
'values': [
{ 'fieldA': 'A', 'fieldB': 28 },
{ 'fieldA': 'B', 'fieldB': 55 }
]
};
CreateVoyager(container, config, data);
}
}
`

I getting such output:
ERROR in node_modules/vega-lite/build/src/util.d.ts(78,16): error TS2344: Type 'keyof T' does not satisfy the constraint 'string'. Type 'string | number | symbol' is not assignable to type 'string'. Type 'number' is not assignable to type 'string'. node_modules/compassql/build/src/schema.d.ts(22,12): error TS2304: Cannot find name 'DLFieldProfile'. node_modules/compassql/build/src/schema.d.ts(24,28): error TS2304: Cannot find name 'DLFieldProfile'. node_modules/compassql/build/src/schema.d.ts(27,29): error TS2304: Cannot find name 'DLFieldProfile'. node_modules/compassql/build/src/schema.d.ts(93,32): error TS2304: Cannot find name 'DLFieldProfile'.

@jaichaturvedi88
Copy link

Even I have the same above issue. Did anyone found solution for this?

@IgorCH
Copy link
Author

IgorCH commented Apr 4, 2019

You need to define
interface DLFieldProfile {
field: string;
type: string;
unique: { [value: string]: number };
count: number;
valid: number;
missing: number;
distinct: number;
min: number | Date;
max: number | Date;
mean: number;
stdev: number;
median: number;
q1: number;
q3: number;
modeskew: number;
}

in typings.d.ts

And check typescript version. I use 2.3.1.

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

2 participants