Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tyatech-chart

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tyatech-chart

Chart builder library for angular

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
2
Weekly downloads
 
Created
Source

Tyatech Chart

Contributions

Contributions are very welcome! It helps me know what features are desired or what bugs are causing the most pain.

I have just one request; If you submit a pull request for a bugfix, please add a unit-test or integration-test (in the spec folder) that catches the problem. Even a PR that just has a failing test is fine - I can analyse what the test is doing and fix the code from that.

Contact Info: truonganh710@gmail.com

Note: Please try to avoid modifying the package version in a PR. Versions are updated on release and any change will most likely result in merge collisions.

To be clear, all contributions added to this library will be included in the library's MIT licence.

Contents

Donut Chart

Demo

Module

import { TyaDonutChartModule } from 'tyatech-chart';

...

@NgModule({
  imports: [
    ...
    TyaDonutChartModule,
  ],
})

Component

import { DonutChartTextType } from 'tyatech-chart';

...

export class AppComponent {
  textType = DonutChartTextType;

  data = [
    { value: 10, data: 'One' },
    { value: 9, data: 'Two' },
    { value: 6, data: 'Three' },
    { value: 5, data: 'Four' },
    { value: 4, data: 'Five' },
    { value: 3, data: 'Six' },
    { value: 1, data: 'Seven' },
  ]
}

HTML:

<tya-donut-chart
  width="100%"
  height="500px"
  [data]="data"
  [alignLabels]="true"
  [isLegend]="true"
  valueField="value"
  dataField="data"
  [textType]="textType.circular"
></tya-donut-chart>
ValueTypeNullableDefaut
widthstringfalse
heightstringfalse
dataArrayfalse
alignLabelsbooleatruefalse
isLegendbooleatruetrue
valueFieldstringtrue'value'
dataFieldstringtrue'data'
textTypeDonutChartTextTypetrueDonutChartTextType.circular

Pie Chart

Demo

Module

import { TyaPieChartModule } from 'tyatech-chart';

...

@NgModule({
  imports: [
    ...
    TyaPieChartModule,
  ],
})

Component

...

export class AppComponent {
  data = [
    { value: 10, data: 'One' },
    { value: 9, data: 'Two' },
    { value: 6, data: 'Three' },
    { value: 5, data: 'Four' },
    { value: 4, data: 'Five' },
    { value: 3, data: 'Six' },
    { value: 1, data: 'Seven' },
  ]
}

HTML:

<tya-pie-chart
  width="100%"
  height="500px"
  [data]="data"
  [endAngle]="270"
  [alignLabels]="true"
  [isLegend]="true"
  valueField="value"
  dataField="data"
>
</tya-pie-chart>
ValueTypeNullableDefaut
widthstringfalse
heightstringfalse
dataArrayfalse
endAnglenumbertrue270
alignLabelsbooleatruefalse
isLegendbooleatruetrue
valueFieldstringtrue'value'
dataFieldstringtrue'data'

Variable Radius Pie Chart

Demo

Module

import { TyaVariableRadiusPieChartModule } from 'tyatech-chart';

...

@NgModule({
  imports: [
    ...
    TyaVariableRadiusPieChartModule,
  ],
})

Component

...

export class AppComponent {
  data = [
    { value: 10, data: 'One' },
    { value: 9, data: 'Two' },
    { value: 6, data: 'Three' },
    { value: 5, data: 'Four' },
    { value: 4, data: 'Five' },
    { value: 3, data: 'Six' },
  ]
}

HTML:

<tya-variable-radius-pie-chart
  width="100%"
  height="500px"
  [data]="data"
  [alignLabels]="true"
  [isLegend]="true"
  valueField="value"
  dataField="data"
></tya-variable-radius-pie-chart>
ValueTypeNullableDefaut
widthstringfalse
heightstringfalse
dataArrayfalse
alignLabelsbooleatruefalse
isLegendbooleatruetrue
valueFieldstringtrue'value'
dataFieldstringtrue'data'

Exploding Pie Chart

Demo

Module

import { TyaExplodingPieChartModule } from 'tyatech-chart';

...

@NgModule({
  imports: [
    ...
    TyaExplodingPieChartModule,
  ],
})

Component

...

export class AppComponent {
  data = [
    {
      data: 'Lithuania',
      value: 500,
      subData: [
        { data: 'A', value: 200 },
        { data: 'B', value: 150 },
        { data: 'C', value: 100 },
        { data: 'D', value: 100 },
      ],
    },
    {
      data: 'Czechia',
      value: 300,
      subData: [{ data: 'A', value: 150 }],
    },
    {
      data: 'Ireland',
      value: 200,
      subData: [
        { data: 'A', value: 110 },
        { data: 'B', value: 60 },
        { data: 'C', value: 30 },
      ],
    },
    {
      data: 'Germany',
      value: 150,
      subData: [
        { data: 'A', value: 80 },
        { data: 'B', value: 40 },
        { data: 'C', value: 30 },
      ],
    },
    {
      data: 'Australia',
      value: 140,
      subData: [
        { data: 'A', value: 90 },
        { data: 'B', value: 40 },
        { data: 'C', value: 10 },
      ],
    },
    {
      data: 'Austria',
      value: 120,
      subData: [
        { data: 'A', value: 60 },
        { data: 'B', value: 30 },
        { data: 'C', value: 30 },
      ],
    },
  ]
}

HTML:

<tya-exploding-pie-chart
  width="100%"
  height="500px"
  [data]="data"
  valueField="value"
  dataField="data"
></tya-exploding-pie-chart>
ValueTypeNullableDefaut
widthstringfalse
heightstringfalse
dataArrayfalse
valueFieldstringtrue'value'
dataFieldstringtrue'data'

Keywords

FAQs

Package last updated on 19 May 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc