@mathstack/old-viz
v1.0.1
Published
A library of Angular components for data visualization produced by Mathematica, Inc.
Keywords
Readme
VizComponents
This library was generated with Angular CLI version 14.0.0.
Code scaffolding
Run ng generate component component-name --project viz-components to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project viz-components.
Note: Don't forget to add
--project viz-componentsor else it will be added to the default project in yourangular.jsonfile.
Build
Run ./build.sh to build the project. The build artifacts will be stored in the dist/ directory.
Publishing
run
npm run preparefrom the viz-components folderin the root folder, run ./build.sh
Go to the dist folder
cd dist/viz-componentsand runnpm publish.
Using the library
- run
npm install @mathstack/old-viz. If it can't be found, it's probably because the preinstall script didn't actually run (it's supposed to but doesn't always, at least not for me, and haven't successfully debugged yet). Manually run the preinstall script,npm run preinstall, then runnpm install @mathstack/old-vizagain.
Extending a component
After installing the library, run ng g viz-components:extend and follow the instructions from there.
If you need to extend a component and then also extend an interactivity directive, see the code snippet below:
export class MyProjectLinesComponent extends LinesComponent {
myLines = true;
}
@Directive()
export class MyProjectLinesHoverMoveDirective extends LinesHoverMoveDirective<MyProjectLinesComponent> {
@Input('vicLinesHoverMoveEffects')
override effects: HoverMoveEventEffect<
LinesHoverMoveDirective<MyProjectLinesComponent>
>[];
constructor(@Inject(LINES) public override lines: MyProjectLinesComponent) {
super(lines);
}
}Running unit tests
Run ng test viz-components to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.
