Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"root": true,
"extends": [
"@swimlane",
"prettier"
],
"overrides": [
{
"files": [
"*.ts"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": [
"./tsconfig.json"
]
},
"extends": [
"@swimlane/eslint-config/typescript",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"prettier"
],
"rules": {
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@angular-eslint/directive-class-suffix": "off",
"@angular-eslint/component-class-suffix": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@angular-eslint/no-input-rename": "off",
"@angular-eslint/no-output-native": "off",
"@angular-eslint/use-lifecycle-interface": "off",
"@angular-eslint/no-output-on-prefix": "off",
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/no-duplicate-enum-values": "off",
"@angular-eslint/prefer-standalone": "off"
}
}
]
}
22 changes: 22 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Close stale issues and PRs'
on:
workflow_dispatch:
schedule:
# Check once a day
- cron: '0 0 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
# A full list of config options can be found at: https://github.com/actions/stale/blob/main/action.yml
days-before-stale: 60
days-before-close: 7
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
stale-pr-message: 'This pr is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
close-pr-message: 'This pr was closed because it has been stalled for 7 days with no activity.'
any-of-labels: 'Need More Info,Needs Demo'
operations-per-run: 300
44 changes: 44 additions & 0 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build, Test, and Deploy

on: [push]
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.17.0

- name: Enable Corepack
run: corepack enable

- name: Install Yarn
run: corepack prepare [email protected] --activate

- name: Install dependencies
run: yarn install --immutable

- name: Build
run: |
yarn build
env:
CI: true

- name: Test
run: |
yarn ci
env:
CI: true

- name: Prepare and deploy
run: |
npm run deploy -- --name="Swimlane" --email="[email protected]"
if: ${{ github.ref == 'refs/heads/master' }}
env:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.angular/cache
node_modules/
.DS_Store
npm-debug.log
Expand All @@ -6,10 +7,11 @@ dist/
build/
coverage/
.idea
yarn.lock
/ngx-charts.iml
ngx-charts.iml
release/src/
release/demo/
.vscode/
/*.tgz
/*.tgz
.yarn
.yarn/install-state.gz
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps = true
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
documentation.json
.vscode/
.angular/
dist/
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# ngx-charts
# @okendo/ngx-charts

[![Join the chat at https://gitter.im/swimlane/ngx-charts](https://badges.gitter.im/swimlane/ngx-charts.svg)](https://gitter.im/swimlane/ngx-charts?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/swimlane/ngx-charts.svg?branch=master)](https://travis-ci.org/swimlane/ngx-charts)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b097196f7f544412a79a99080a41bbc1)](https://www.codacy.com/app/Swimlane/ngx-charts?utm_source=github.com&utm_medium=referral&utm_content=swimlane/ngx-charts&utm_campaign=Badge_Grade)
[![npm version](https://badge.fury.io/js/%40swimlane%2Fngx-charts.svg)](https://badge.fury.io/js/%40swimlane%2Fngx-charts)
[![npm downloads](https://img.shields.io/npm/dm/@swimlane/ngx-charts.svg)](https://npmjs.org/@swimlane/ngx-charts)
Fork from [https://github.com/swimlane/ngx-charts]

Declarative Charting Framework for Angular!

Expand All @@ -30,6 +31,7 @@ For more info, check out the [documentation](https://swimlane.gitbook.io/ngx-cha
- Heatmap
- Treemap
- Number Cards
- Sankey Diagram

### Customization

Expand All @@ -56,6 +58,22 @@ npm i @swimlane/ngx-charts --save

To learn how to use the ngx-charts components to build custom charts and find examples, please refer to our [Custom Charts Page](https://github.com/swimlane/ngx-charts/blob/master/docs/custom-charts.md).

## Release

- Checkout master (`git checkout master`)
- Pull master (`git pull`)
- Refresh node modules (`npm ci`)
- Run tests (`npm test`)
- Examine log to determine next version (X.Y.Z)
- Run `git checkout -b release/X.Y.Z`
- Update version in `projects/swimlane/ngx-charts/package.json`.
- Update changelog in `projects/docs/changelog.md`
- Run `git commit -am "(release): X.Y.Z"`
- Run `git tag X.Y.Z`
- Run `git push origin HEAD --tags`
- Run `npm run publish:lib`
- Submit PR

## Credits

`ngx-charts` is a [Swimlane](http://swimlane.com) open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.
Expand Down
34 changes: 34 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Security Policy

## Supported Versions

We release patches for security vulnerabilities in the latest major version of the package:

| Version | Supported |
| ------- | ------------------ |
| Latest | :white_check_mark: |
| Older | :x: |

## Reporting a Vulnerability

If you discover a security vulnerability, please report it to us as follows:

1. **Email us**: Send an email to [[email protected]](mailto:[email protected]) with the details of the vulnerability.
2. **Provide details**: Include as much information as possible about the vulnerability, including steps to reproduce it, potential impact, and any suggested fixes.
3. **Wait for a response**: We will acknowledge your email within 72 hours and provide a timeline for a fix.

## Security Updates

We will release security updates as needed. Users are encouraged to update to the latest version to ensure they have the latest security fixes.

## Security Best Practices

To help secure your Angular project, we recommend the following best practices:

- **Keep dependencies up to date**: Regularly update your project dependencies to the latest versions.
- **Use HTTPS**: Ensure your application is served over HTTPS to protect data in transit.
- **Sanitize inputs**: Always sanitize user inputs to prevent injection attacks.
- **Enable Content Security Policy (CSP)**: Use CSP to mitigate cross-site scripting (XSS) and other code injection attacks.
- **Regularly review code**: Conduct regular code reviews to identify and fix potential security issues.

Thank you for helping us keep our project secure!
61 changes: 35 additions & 26 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": false
},
"version": 1,
"newProjectRoot": "projects",
"projects": {
Expand All @@ -15,17 +18,25 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/ngx-charts",
"outputPath": {
"base": "dist/ngx-charts"
},
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"src/polyfills.ts"
],
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
"scripts": [],
"allowedCommonJsDependencies": ["emoji-flags", "codemirror", "ajv", "mousetrap", "moment-timezone"],
"extractLicenses": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true,
"browser": "src/main.ts"
},
"configurations": {
"production": {
Expand All @@ -38,11 +49,8 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand All @@ -51,35 +59,34 @@
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "100kb"
"maximumWarning": "6kb"
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ngx-charts:build"
"buildTarget": "ngx-charts:build"
},
"configurations": {
"production": {
"browserTarget": "ngx-charts:build:production"
"buildTarget": "ngx-charts:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ngx-charts:build"
"buildTarget": "ngx-charts:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
Expand All @@ -88,10 +95,9 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": ["src/**/*.ts"]
}
},
"e2e": {
Expand Down Expand Up @@ -135,17 +141,20 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/swimlane/ngx-charts/tsconfig.lib.json",
"projects/swimlane/ngx-charts/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": ["projects/swimlane/ngx-charts/src/**/*.ts"]
}
}
}
}
},
"defaultProject": "ngx-charts"
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
Loading