Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@obliczeniowo/elementary
Advanced tools
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.9.
This library was generated with Angular CLI version 11.0.9.
Inside library You can find two components:
lib-diagram lib-status-bar
Install package:
npm i @obliczeniowo/elementary
Import module:
import { ComponentsModule } from '@obliczeniowo/elementary';
...
imports: [
BrowserModule,
AppRoutingModule,
ComponentsModule // here is import
],
Inside of your own component:
import { Component } from '@angular/core';
import { ColorHSV, ColorRGB } from '@obliczeniowo/elementary';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
title = 'Diagram';
xLabel = 'xLabel';
yLabel = 'yLabel';
diagramData = {
'key 1': 100,
'key 2': 200,
'key 3': 1500,
'key 4': 1,
'key 5': 2,
'key 6': 145,
'key 7': 200,
'key 8': 340,
'key 9': 885,
'key 10': 1234,
'key 11': 450,
'key 12': 800,
'key 13': 3900,
'key 14': 1300,
'key 15': 1200,
'key 16': 2500,
'key 17': 1300,
'key 18': 1200,
'key 19': 2500,
};
colorFunction = (
index: number,
dataLength: number,
value: number,
max: number
): ColorRGB => {
return ColorHSV.createColorHSV(
180 - (180 * value) / max,
0.5,
255
).convertToRGB();
}
}
In HTML:
<lib-diagram
[diagramData]="diagramData"
[diagramTitle]="title"
[xLabel]="xLabel"
[yLabel]="yLabel"
[colorFunction]="colorFunction"
>
</lib-diagram>
Example of use in html without 3d effect:
<lib-status-bar [value]="20" [effect3d]="false"></lib-status-bar>
Example of use in html with 3d effect
<lib-status-bar [value]="20"></lib-status-bar>
Example of use in html for color picker with button:
Example of use in html for color component withour button:
Run ng generate component component-name --project components
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project components
.
Note: Don't forget to add
--project components
or else it will be added to the default project in yourangular.json
file.
Run ng build components
to build the project. The build artifacts will be stored in the dist/
directory.
After building your library with ng build components
, go to the dist folder cd dist/components
and run npm publish
.
Run ng test components
to execute the unit tests via Karma.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
FAQs
Library made in Angular version 18
The npm package @obliczeniowo/elementary receives a total of 1,475 weekly downloads. As such, @obliczeniowo/elementary popularity was classified as popular.
We found that @obliczeniowo/elementary demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.