:bar_chart: Declarative Charting Framework for Angular

Overview

ngx-charts

Join the chat at https://gitter.im/swimlane/ngx-charts Codacy Badge npm version npm downloads

Declarative Charting Framework for Angular!

ngx-charts is unique because we don't merely wrap d3, nor any other chart engine for that matter. It is using Angular to render and animate the SVG elements with all of its binding and speed goodness, and uses d3 for the excellent math functions, scales, axis and shape generators. By having Angular do all of the rendering it opens us up to endless possibilities the Angular platform provides such as AoT, SSR, etc.

Data visualization is a science but that doesn't mean it has to be ugly. One of the big efforts we've made while creating this project is to make the charts aesthetically pleasing. The styles are also completely customizable through CSS, so you can override them as you please.

Also, constructing custom charts is possible by leveraging the various ngx-charts components that are exposed through the ngx-charts module.

For more info, check out the documentation and the demos.

Features

Chart Types

  • Horizontal & Vertical Bar Charts (Standard, Grouped, Stacked, Normalized)
  • Line
  • Area (Standard, Stacked, Normalized)
  • Pie (Explodable, Grid, Custom legends)
  • Bubble
  • Donut
  • Gauge (Linear & Radial)
  • Heatmap
  • Treemap
  • Number Cards

Customization

  • Autoscaling
  • Timeline Filtering
  • Line Interpolation
  • Configurable Axis Labels
  • Legends (Labels & Gradient)
  • Advanced Label Positioning
  • Real-time data support
  • Advanced Tooltips
  • Data point Event Handlers
  • Works with ngUpgrade

Install

To use ngx-charts in your project install it via npm:

npm i @swimlane/ngx-charts --save

Custom Charts

To learn how to use the ngx-charts components to build custom charts and find examples, please refer to our Custom Charts Page.

Credits

ngx-charts is a Swimlane 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.

SecOps Hub is an open, product-agnostic, online community for security professionals to share ideas, use cases, best practices, and incident response strategies.

Comments
  • Charts to be responsive on screen resize

    Charts to be responsive on screen resize

    **I'm submitting a

    • [X] feature request

    Current behavior Charts are not responsive. On screen resize, they don't scale.

    Expected behavior Charts should resize based on screen resize.

    Reproduction of the problem swimlane-charts-responsive

    What is the motivation / use case for changing the behavior? To use charts with different screen sizes

    Please tell us about your environment: Operating system - mac IDE - webstorm package manager - NPM

    • ngx-charts version: 3.0.4

    • Angular version: 2.4.1

    • **Browser:**Chrome & Firefox

    In Discussion Need More Info 
    opened by richavyas 35
  • download the chart as a image or excel spreadsheet

    download the chart as a image or excel spreadsheet

    I'm submitting a ... [ ] bug report => search github for a similar issue or PR before submitting [ x ] feature request [ ] support request => Please do not submit support request here

    Current behavior No download option

    Expected behavior The ability to download the chart as a image or excel spreadsheet, like highcharts https://www.highcharts.com/docs/export-module/export-module-overview

    What is the motivation / use case for changing the behavior? Allows greater use of the charts package by consumers, allowing them to save data for offline use or putting into a report, such as presentation.

    New Feature In Discussion Suggestion 
    opened by ChrisDevinePimss 33
  • isn't a known property of 'ngx-charts-bar-vertical'

    isn't a known property of 'ngx-charts-bar-vertical'

    I'm submitting a ... (check one with "x")

    [X] bug report => search github for a similar issue or PR before submitting
    [ ] feature request
    [ ] support request => Please do not submit support request here
    

    Current behavior I've tried to reproduce a simple vertical bar based on the documentation, and I've got the following error in the console:

    Can't bind to 'view' since it isn't a known property of 'ngx-charts-bar-vertical'.
    

    Of course not just for 'view', but for all attributes of the tag.

    Please tell us about your environment: Ubuntu, NPM, angular-cli

    • ngx-charts version: 4.0.1

    • Angular version: 2.2.3

    • Browser: Chrome

    • Language: TS

    Need More Info 
    opened by armarton 31
  • Display all points (circles) by default

    Display all points (circles) by default

    I'm submitting a ... (check one with "x")

    [ ] bug report => search github for a similar issue or PR before submitting
    [x] feature request
    [ ] support request => Please do not submit support request here
    

    Expected behavior

    It seems that in you can not display all the points by default in line and area chart other than putting all the data in the activeEntries, but once you hover the chart you lose all of the points again. Maybe I'm missing something but I can not find it in the documentation or elsewhere.

    What is the motivation / use case for changing the behavior?

    Sometime it is useful to have all the points (circles) displayed all the time because it is hard to determine where are the points in some cases.

    • ngx-charts version: 5.3.1
    • Angular version: 4.2.2
    opened by metodribic 28
  • How to set the width of Vertical Bar Charts?

    How to set the width of Vertical Bar Charts?

    I am using Vertical Stacked Bar Chart in my project. I don't know how to adjust the width of the bar of chart. If I have multiple bars on charts, it looks good but if I have a single bar on charts it takes the whole space on chart and looks like a piece of block on chart. If there is a possible way to fix this issue please help me.

    opened by ChitrajanDhiman 25
  • Allow other data

    Allow other data

    I'm submitting a ... (check one with "x")

    [x] bug report => search github for a similar issue or PR before submitting
    [ ] feature request
    [ ] support request => Please do not submit support request here
    

    Current behavior Hi I have this as data in a pie chart : { 'name': 'Carburant Pétrolier VE', 'value': 2306.18, 'filter': 'G33' }, { 'name': 'Assurance (Prime et Fond de garantie)', 'value': 1537.95, 'filter': 'G69' }

    and on select when i get the data selected it returns only name and value NOT filter, is there a way to get the filter.

    Expected behavior I should get name and value and filter

    Reproduction of the problem

    What is the motivation / use case for changing the behavior?

    Please tell us about your environment:

    • ngx-charts version: x.x.x 6.0.0

    • Angular version: 2.x.x

    • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    • Language: [all | TypeScript X.X | ES6/7 | ES5]
    Enhancement In Discussion Suggestion 
    opened by TolotraRam 25
  • ngx-charts causes 'Cannot read property 'length' of undefined' with angular-cli beta.30

    ngx-charts causes 'Cannot read property 'length' of undefined' with angular-cli beta.30

    I'm submitting a ... (check one with "x")

    [x] bug report => search github for a similar issue or PR before submitting
    [ ] feature request
    [ ] support request => Please do not submit support request here
    

    Current behavior

    [email protected] causes the following error with @angular/[email protected] in combination with the peer dependency @ngtools/webpack@>1.2.4 (with @ngtools/[email protected] installed as dev-dependency it still works without errors).

    Cannot read property 'length' of undefined
    TypeError: Cannot read property 'length' of undefined
        at createSourceFile (...\node_modules\typescript\lib\typescript.js:14552:109)
        at parseSourceFileWorker (...\node_modules\typescript\lib\typescript.js:14484:26)
        at Object.parseSourceFile (...\node_modules\typescript\lib\typescript.js:14433:26)
        at Object.createSourceFile (...\node_modules\typescript\lib\typescript.js:14288:29)
        at WebpackCompilerHost.getSourceFile (...\node_modules\@ngtools\webpack\src\compiler_host.js:209:27)
        at findSourceFile (...\node_modules\typescript\lib\typescript.js:63453:29)
        at processSourceFile (...\node_modules\typescript\lib\typescript.js:63384:27)
        at ...\node_modules\typescript\lib\typescript.js:63494:17
        at Object.forEach (...\node_modules\typescript\lib\typescript.js:1293:30)
        at processReferencedFiles (...\node_modules\typescript\lib\typescript.js:63492:16)
        at findSourceFile (...\node_modules\typescript\lib\typescript.js:63477:21)
        at processImportedModules (...\node_modules\typescript\lib\typescript.js:63600:25)
        at findSourceFile (...\node_modules\typescript\lib\typescript.js:63481:17)
        at processImportedModules (...\node_modules\typescript\lib\typescript.js:63600:25)
        at findSourceFile (...\node_modules\typescript\lib\typescript.js:63481:17)
        at processSourceFile (...\node_modules\typescript\lib\typescript.js:63384:27)
        at processRootFile (...\node_modules\typescript\lib\typescript.js:63271:13)
        at ...\node_modules\typescript\lib\typescript.js:62620:60
        at Object.forEach (...\node_modules\typescript\lib\typescript.js:1293:30)
        at Object.createProgram (...\node_modules\typescript\lib\typescript.js:62620:16)
        at AotPlugin._setupOptions (...\node_modules\@ngtools\webpack\src\plugin.js:111:28)
        at new AotPlugin (...\node_modules\@ngtools\webpack\src\plugin.js:21:14)
        at _createAotPlugin (...\node_modules\@angular\cli\models\webpack-configs\typescript.js:28:12)
        at Object.exports.getNonAotConfig (...\node_modules\@angular\cli\models\webpack-configs\typescript.js:55:13)
        at new NgCliWebpackConfig (...\node_modules\@angular\cli\models\webpack-config.js:24:37)
        at Class.run (...\node_modules\@angular\cli\tasks\serve.js:33:29)
        at checkExpressPort.then.then (...\node_modules\@angular\cli\commands\serve.js:84:26)
        at process._tickCallback (internal/process/next_tick.js:103:7)
    

    might be related to:

    • https://github.com/angular/angular-cli/issues/4408
    • https://github.com/angular/angular-cli/issues/4352

    Expected behavior

    ngx-charts not causing the error ;-)

    Reproduction of the problem

    Using @angular/[email protected] with [email protected] As soon as I remove ngx-charts from my package.json the error does not occur while compiling/building with ng serve

    What is the motivation / use case for changing the behavior?

    Please tell us about your environment:

    Windows 10 VS Code yarn / npm

    • ngx-charts version: x.x.x
                                 _                           _  _
      __ _  _ __    __ _  _   _ | |  __ _  _ __         ___ | |(_)
     / _` || '_ \  / _` || | | || | / _` || '__|_____  / __|| || |
    | (_| || | | || (_| || |_| || || (_| || |  |_____|| (__ | || |
     \__,_||_| |_| \__, | \__,_||_| \__,_||_|          \___||_||_|
                   |___/
    @angular/cli: 1.0.0-beta.31
    node: 6.9.5
    os: win32 x64
    @angular/common: 2.4.7
    @angular/compiler: 2.4.7
    @angular/core: 2.4.7
    @angular/flex-layout: 2.0.0-beta.4
    @angular/forms: 2.4.7
    @angular/http: 2.4.7
    @angular/material: 2.0.0-beta.1
    @angular/platform-browser: 2.4.7
    @angular/platform-browser-dynamic: 2.4.7
    @angular/router: 3.4.7
    @angular/cli: 1.0.0-beta.31
    @angular/compiler-cli: 2.4.7
    @angular/tsc-wrapped: 0.5.2
    
    typescript: 2.0.3 or 2.1.6
    
    • Angular version: 2.x.x
    • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    • Language: [all | TypeScript X.X | ES6/7 | ES5]
    Investigate 
    opened by the-ult 23
  • Angular 9 - Ivy compatibility

    Angular 9 - Ivy compatibility

    Hey!

    Currently enabling ivy causes following erorrs to be thrown:

    :4200/vendor.js:86170 Can't bind to 'colors' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'series' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'showLabels' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'labelFormatting' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'trimLabels' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'maxLabelLength' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'activeEntries' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'innerRadius' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'outerRadius' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'explodeSlices' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'gradient' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'animations' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'tooltipDisabled' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'tooltipTemplate' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    :4200/vendor.js:86170 Can't bind to 'tooltipText' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ :4200/vendor.js:86170
    core.js:14133 Can't bind to 'colors' since it isn't a known property of 'g'.
    warnAboutUnknownProperty @ core.js:14133
    elementPropertyInternal @ core.js:13993
    ɵɵproperty @ core.js:23730
    PieChartComponent_Template @ esm.js:18354
    executeTemplate @ core.js:13550
    refreshView @ core.js:13412
    refreshComponent @ core.js:14707
    refreshChildComponents @ core.js:13149
    refreshView @ core.js:13466
    refreshDynamicEmbeddedViews @ core.js:14684
    refreshView @ core.js:13437
    refreshComponent @ core.js:14707
    refreshChildComponents @ core.js:13149
    refreshView @ core.js:13466
    refreshDynamicEmbeddedViews @ core.js:14684
    refreshView @ core.js:13437
    refreshDynamicEmbeddedViews @ core.js:14684
    refreshView @ core.js:13437
    refreshComponent @ core.js:14707
    refreshChildComponents @ core.js:13149
    refreshView @ core.js:13466
    refreshDynamicEmbeddedViews @ core.js:14684
    refreshView @ core.js:13437
    refreshDynamicEmbeddedViews @ core.js:14684
    refreshView @ core.js:13437
    refreshDynamicEmbeddedViews @ core.js:14684
    refreshView @ core.js:13437
    refreshComponent @ core.js:14707
    refreshChildComponents @ core.js:13149
    refreshView @ core.js:13466
    refreshComponent @ core.js:14707
    refreshChildComponents @ core.js:13149
    refreshView @ core.js:13466
    refreshDynamicEmbeddedViews @ core.js:14684
    refreshView @ core.js:13437
    refreshComponent @ core.js:14707
    refreshChildComponents @ core.js:13149
    refreshView @ core.js:13466
    refreshDynamicEmbeddedViews @ core.js:14684
    refreshView @ core.js:13437
    refreshComponent @ core.js:14707
    refreshChildComponents @ core.js:13149
    refreshView @ core.js:13466
    renderComponentOrTemplate @ core.js:13524
    tickRootContext @ core.js:14871
    detectChangesInRootView @ core.js:14906
    detectChanges @ core.js:16447
    tick @ core.js:42057
    (anonymous) @ core.js:41905
    invoke @ zone-evergreen.js:365
    onInvoke @ core.js:40674
    invoke @ zone-evergreen.js:364
    run @ zone-evergreen.js:124
    run @ core.js:40486
    next @ core.js:41902
    schedulerFn @ core.js:36276
    __tryOrUnsub @ Subscriber.js:183
    next @ Subscriber.js:122
    _next @ Subscriber.js:72
    next @ Subscriber.js:49
    next @ Subject.js:39
    emit @ core.js:36238
    checkStable @ core.js:40617
    onLeave @ core.js:40735
    onInvokeTask @ core.js:40658
    invokeTask @ zone-evergreen.js:399
    runTask @ zone-evergreen.js:168
    invokeTask @ zone-evergreen.js:481
    ZoneTask.invoke @ zone-evergreen.js:470
    timer @ zone-evergreen.js:2535
    Show 40 more frames
    core.js:14133 Can't bind to 'series' since it isn't a known property of 'g'.
    

    My guess is that you are using abstract classes which need to be decorated with @Directive() as described at https://next.angular.io/guide/migration-undecorated-classes

    New Feature 
    opened by Enngage 22
  • Support for IE

    Support for IE

    [ ] bug report => search github for a similar issue or PR before submitting [x ] feature request [ ] support request => Please do not submit support request here

    
    **Current behavior**
    Charts don't work at IE edge/11/10
    
    Hi,
    I am very impressed of the work that has been done on this OS, and I would like to use it.
    I have noticed that the charts don't work on IE.
    Are you familiar with the issue? is it going to be fixed soon (is there ETA)?
    
    Thanks a lot
    
    
    
    opened by tssobe 22
  • Responsive Charts slightly bigger than container

    Responsive Charts slightly bigger than container

    I'm submitting a ... (check one with "x")

    [x ] bug report => search github for a similar issue or PR before submitting
    [ ] feature request
    [ ] support request => Please do not submit support request here
    

    Current behavior the svg element is marginally bigger than its parent container in responsive mode if parent container has padding

    Expected behavior the svg element would fit the parent container in responsive mode and take account of the padding

    Reproduction of the problem Use any container that has padding e.g. BS4 card <div class="card"> <div class="card-header"> State Of The Parties </div> <div class="card-block" style="width:100%; min-height: 300px;"> <ngx-charts-bar-horizontal [scheme]="colorScheme" [results]="partyTotals" [yAxis]="true" [xAxis]="true" [legend]="false" [showGridLines]="false" [showXAxisLabel]="true" [showYAxisLabel]="true" [yAxisLabel]="Parties" [xAxisTickFormatting]="xBarFormat" (select)="onSelect($event)"> </ngx-charts-bar-horizontal> </div> </div>

    What is the motivation / use case for changing the behavior? Chart hangs outside its container

    Windows 10

    • ngx-charts version: 4.1.2
    • Angular version: 2.4.7

    2017-02-14 3 2017-02-14 4

    Bug Investigate 
    opened by 72gm 22
  • ngx bar chart not working

    ngx bar chart not working

    Describe the bug Ngx Vertical bar chart is not working in serve PROD

    To Reproduce Steps to reproduce the behavior:

    1. Go to '...'
    2. Click on '....'
    3. Scroll down to '....'
    4. See error

    Expected behavior Bar Chart should load with data

    Screenshots If applicable, add screenshots to help explain your problem.

    Demo Provide an online demo (stackblitz, codesandbox, or similar) where the issue can be reproduced

    ngx-charts version 10.1.0, even present for 12.0.1

    Additional context The issue only exists when we do ng serve --prod with optimization and buildOptimizer as true(we cannot turn these off for PROD), otherwise it works fine. We have our application on angular 7 with below configuration.

    Angular JSON: "configurations": { "production": { "optimization": true, "outputHashing": "all", "sourceMap": true, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, } }

    Package JSON: "@angular/animations": "7.2.7", "@angular/common": "7.2.7", "@angular/compiler": "7.2.7", "@angular/core": "7.2.7", "@angular/fire": "5.0.2", "@angular/flex-layout": "7.0.0-beta.23", "@angular/cdk": "7.3.1", "@angular/forms": "7.2.7", "@angular/http": "7.2.7", "@angular/platform-browser": "7.2.7", "@angular/platform-browser-dynamic": "7.2.7", "@angular/router": "7.2.7", "@swimlane/ngx-charts": "10.1.0",

    "devDependencies": { "@angular-devkit/build-angular": "0.13.9", "@angular/cli": "^7.3.3", "@angular/compiler-cli": "7.2.7", "@angular/language-service": "7.2.7", "@types/jasmine": "2.8.3", "@types/jasminewd2": "2.0.2", "@types/node": "6.0.60", "codelyzer": "4.0.1", "jasmine-core": "2.99.1", "jasmine-spec-reporter": "4.2.1", "karma": "2.0.0", "karma-chrome-launcher": "2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "1.1.1", "karma-jasmine-html-reporter": "0.2.2", "protractor": "5.1.2", "ts-node": "4.1.0", "tslint": "5.9.1", "typescript": "3.2.4" }

    ERROR IN CONSOLE: 2019-11-19T06:22:36.870Z [ERROR] ERROR: TypeError: (void 0) is not a function at Sf (defaultLocale.js.pre-build-optimizer.js:4) at Function.n.tickFormat (linear.js.pre-build-optimizer.js:15) at n.update (y-axis-ticks.component.js.pre-build-optimizer.js:60) at n.ngOnChanges (y-axis-ticks.component.js.pre-build-optimizer.js:34) at core.js.pre-build-optimizer.js:22117 at core.js.pre-build-optimizer.js:23378 at Ry (core.js.pre-build-optimizer.js:23327) at rv (core.js.pre-build-optimizer.js:23865) at Object.updateDirectives (y-axis.component.d.ts.YAxisComponent.html:3) at Object.updateDirectives (core.js.pre-build-optimizer.js:23653) at ky (core.js.pre-build-optimizer.js:23306) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at Object.ky [as checkAndUpdateView] (core.js.pre-build-optimizer.js:23312) at e.detectChanges (core.js.pre-build-optimizer.js:21687) at core.js.pre-build-optimizer.js:18118 at Array.forEach (<anonymous>) at e.tick (core.js.pre-build-optimizer.js:18118) at core.js.pre-build-optimizer.js:18009 at t.invoke (zone.js.pre-build-optimizer.js:391) at Object.onInvoke (core.js.pre-build-optimizer.js:17298) at t.invoke (zone.js.pre-build-optimizer.js:390) at n.run (zone.js.pre-build-optimizer.js:150) at e.run (core.js.pre-build-optimizer.js:17212) at Object.next (core.js.pre-build-optimizer.js:18009) at t.o [as _next] (core.js.pre-build-optimizer.js:13514) at t.__tryOrUnsub (Subscriber.js.pre-build-optimizer.js:194) at t.next (Subscriber.js.pre-build-optimizer.js:132) at t._next (Subscriber.js.pre-build-optimizer.js:76) at t.next (Subscriber.js.pre-build-optimizer.js:53) at t.next (Subject.js.pre-build-optimizer.js:47)

    and 2019-11-19T06:22:36.910Z [ERROR] ERROR: TypeError: e.transform is not a function at Object.updateRenderer (y-axis-ticks.component.d.ts.YAxisTicksComponent.html:3) at Object.updateRenderer (core.js.pre-build-optimizer.js:23655) at ky (core.js.pre-build-optimizer.js:23311) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at ky (core.js.pre-build-optimizer.js:23312) at Gy (core.js.pre-build-optimizer.js:23547) at Vy (core.js.pre-build-optimizer.js:23510) at ky (core.js.pre-build-optimizer.js:23307) at Gy (core.js.pre-build-optimizer.js:23547) at jy (core.js.pre-build-optimizer.js:23489) at Object.ky [as checkAndUpdateView] (core.js.pre-build-optimizer.js:23312) at e.detectChanges (core.js.pre-build-optimizer.js:21687) at core.js.pre-build-optimizer.js:18118 at Array.forEach (<anonymous>) at e.tick (core.js.pre-build-optimizer.js:18118) at core.js.pre-build-optimizer.js:18009 at t.invoke (zone.js.pre-build-optimizer.js:391) at Object.onInvoke (core.js.pre-build-optimizer.js:17298) at t.invoke (zone.js.pre-build-optimizer.js:390) at n.run (zone.js.pre-build-optimizer.js:150) at e.run (core.js.pre-build-optimizer.js:17212) at Object.next (core.js.pre-build-optimizer.js:18009) at t.o [as _next] (core.js.pre-build-optimizer.js:13514) at t.__tryOrUnsub (Subscriber.js.pre-build-optimizer.js:194) at t.next (Subscriber.js.pre-build-optimizer.js:132) at t._next (Subscriber.js.pre-build-optimizer.js:76) at t.next (Subscriber.js.pre-build-optimizer.js:53) at t.next (Subject.js.pre-build-optimizer.js:47) at t.emit (core.js.pre-build-optimizer.js:13498) at Ah (core.js.pre-build-optimizer.js:17267)

    Bug 
    opened by kkakroo 21
  • How to get previous value of series on tooltip template of ngx-charts-line-chart?

    How to get previous value of series on tooltip template of ngx-charts-line-chart?

    I'm trying to create a line chart that shows company growth. Here is my series:

    [
      {
        "name": "Total Payments Growth",
        "series": [
          {
            "name": "Jul-2022",
            "value": 0
          },
          {
            "name": "Aug-2022",
            "value": 1231
          },
          {
            "name": "Sep-2022",
            "value": 1452
          },
          {
            "name": "Oct-2022",
            "value": 1863
          },
          {
            "name": "Nov-2022",
            "value": 2847
          },
          {
            "name": "Dec-2022",
            "value": 5687
          }
        ]
      }
    ]
    

    I've put this series to ngx-charts-line-chart like this:

    
    <ngx-charts-line-chart
      [scheme]="colorSchemes.chart1"
      [legend]="true"
      [legendPosition]="below"
      [showXAxisLabel]="true"
      [showYAxisLabel]="true"
      [xAxis]="true"
      [yAxis]="true"
      [xAxisLabel]="Time"
      [yAxisLabel]="Amount"
      [timeline]="true"
      [results]="data.chart1"
    >
      <ng-template #seriesTooltipTemplate let-model="model">
        <div class="tooltip">
          {{ model[0].value }}
        </div>
      </ng-template>
    </ngx-charts-line-chart>
    
    

    Yes, this shows the value. But I want to show the growth like "2847 -> 5687"(Nov-2022 value -> Dec-2022 value) on the Dec-2022. I mean I want to get the previous value of data in the seriesTooltipTemplate.

    How can I do this?

    New Feature 
    opened by sundowatch 0
  • Latest version suffering from High transitive security vulnerabilities

    Latest version suffering from High transitive security vulnerabilities

    Describe the bug While a fix for the security vulnerability in d3-color was released - that same package is still causing transitive security vulnerabilities as the vulnerable version is pulled in by other d3 packages (specifically d3-brush, d3-interpolate, d3-scale, and d3-transition) which were not updated.

    Screenshots image

    ngx-charts version 20.1.2

    Additional context First reported on issue #1809 by @uap-universe after it was closed

    Bug 
    opened by Blackbaud-TrevorBurch 2
  • 20.2.0 is not available in npm

    20.2.0 is not available in npm

    The latest release tag is 20.2.0 in github. But the latest available in npm is https://www.npmjs.com/package/@swimlane/ngx-charts 20.1.2. I think the build had some sort of failure

    opened by SRChiP 0
  • Adjustable angle of the pie chart series to show the label

    Adjustable angle of the pie chart series to show the label

    What kind of change does this PR introduce? (check one with "x")

    • [ ] Bugfix
    • [X] Feature
    • [ ] Code style update (formatting, local variables)
    • [ ] Refactoring (no functional changes, no api changes)
    • [ ] Build related changes
    • [ ] CI related changes
    • [ ] Other... Please describe:

    What is the current behavior? (You can also link to an open issue here) https://github.com/swimlane/ngx-charts/issues/1825 Currently labels in pie-chart are shown only if series angle is grater than Math.PI / 30.

    What is the new behavior? A new parameter named minDegreesToShowLabel has been added. Now the user can set which labels will be visible by specifying the minimum value of the series angle.

    Does this PR introduce a breaking change? (check one with "x")

    • [ ] Yes
    • [X] No

    If this PR contains a breaking change, please describe the impact and migration path for existing applications: ... Only pie-chart was affected.

    Other information: Closes #1825

    opened by mateusz800 0
  • Types of d3-shape missing

    Types of d3-shape missing

    Describe the bug Missing dependency

    To Reproduce Install version 20.1.2

    Workaround npm i --save-dev @types/d3-shape --legacy-peer-deps resolves this, but this package is a dependency of ngx-charts and should not be in my project's package.json

    image

    Bug 
    opened by btxtiger 0
  • Swimlane ngx-pie-chart pie-label-line not showing issue

    Swimlane ngx-pie-chart pie-label-line not showing issue

    Describe the bug When smaller value came in pie chart, Not display pie label line: ngx-pie-chart example: The length is 4 comparing the values like(640,100,27,8,4) only the 3 values show in the pie line label the last two values pie label line not display.

    swimlane/ngx-charts version 20.1.0

    chart_issue

    Bug 
    opened by rameshp6s 0
Owner
Swimlane
Swimlane is a Security Automation and Orchestration platform
Swimlane
:bar_chart: A D3-based reusable chart library

c3 c3 is a D3-based reusable chart library that enables deeper integration of charts into web applications. Follow the link for more information: http

C3.js 9.2k Jan 2, 2023
:bar_chart: Re-usable, easy interface JavaScript chart library based on D3.js

billboard.js is a re-usable, easy interface JavaScript chart library, based on D3 v4+. The name "billboard" comes from the famous billboard chart whic

NAVER 5.4k Jan 1, 2023
:bar_chart: A library of modular chart components built on D3

Plottable Plottable is a library of chart components for creating flexible, custom charts for websites. It is built on top of D3.js and provides highe

Palantir Technologies 2.9k Dec 31, 2022
Highcharts JS, the JavaScript charting framework

Highcharts JS is a JavaScript charting library based on SVG, with fallbacks to VML and canvas for old browsers. Official website: www.highcharts.com D

Highsoft 10.9k Jan 9, 2023
An easy-to-use cross-framework JS charting library

Compact Chart Visualize your data under a minute, in any Javascript framework Table of Contents About How to use it Examples Demo Plain HTML Example w

Mireo 1 Jul 28, 2021
Beautiful React SVG maps with d3-geo and topojson using a declarative api.

react-simple-maps Create beautiful SVG maps in react with d3-geo and topojson using a declarative api. Read the docs, or check out the examples. Why R

z creative labs 2.7k Dec 29, 2022
🌏 A Declarative 3D Globe Data Visualization Library built with Three.js

Gio.js English | 中文 React Version: react-giojs Wechat minigame: wechat usage Gio.js is an open source library for web 3D globe data visualization buil

syt123450 1.6k Dec 29, 2022
Apache ECharts is a powerful, interactive charting and data visualization library for browser

Apache ECharts Apache ECharts is a free, powerful charting and visualization library offering an easy way of adding intuitive, interactive, and highly

The Apache Software Foundation 53.8k Jan 9, 2023
A reusable charting library written in d3.js

NVD3 - A reusable D3 charting library Inspired by the work of Mike Bostock's Towards Reusable Charts, and supported by a combined effort of Novus and

Novus 7.2k Jan 3, 2023
Multi-Dimensional charting built to work natively with crossfilter rendered with d3.js

dc.js Dimensional charting built to work natively with crossfilter rendered using d3.js. In dc.js, each chart displays an aggregation of some attribut

null 7.4k Jan 4, 2023
:dango: An interactive and responsive charting library

English | 简体中文 G2Plot A charting library based on the Grammar of Graphics. G2Plot is an interactive and responsive charting library. Based on the gram

AntV team 2.3k Dec 30, 2022
Ember Charts 3.5 2.3 L2 JavaScript A powerful and easy to use charting library for Ember.js

Ember Charts A charting library built with the Ember.js and d3.js frameworks. It includes time series, bar, pie, and scatter charts which are easy to

Addepar 793 Dec 7, 2022
Simple yet powerful JavaScript Charting library built using d3.js

uvCharts Simple, robust, extensible JavaScript charting library built using d3 designed to help developers embed, build charts in less than couple of

Imaginea 267 May 20, 2021
📱📈An elegant, interactive and flexible charting library for mobile.

中文 README F2 is born for mobile, developed for developers as well as designers. It is Html5 Canvas-based, and is also compatible with Node.js, Weex an

AntV team 7.8k Dec 31, 2022
Apache ECharts is a powerful, interactive charting and data visualization library for browser

Apache ECharts Apache ECharts is a free, powerful charting and visualization library offering an easy way of adding intuitive, interactive, and highly

The Apache Software Foundation 53.8k Jan 5, 2023
Open-source JavaScript charting library behind Plotly and Dash

Plotly.js is a standalone Javascript data visualization library, and it also powers the Python and R modules named plotly in those respective ecosyste

Plotly 15.3k Jan 4, 2023
Liquify charting library

Liquify Liquify: fast, multi-threaded visualization of stream data with ChartJS & Angular. The aim of Liquify is to provide a fast, customizable and e

null 4 Aug 23, 2022
React components for Chart.js, the most popular charting library

react-chartjs-2 React components for Chart.js, the most popular charting library. Supports Chart.js v3 and v2. Quickstart • Docs • Slack • Stack Overf

null 5.6k Jan 4, 2023
Chart.js module for charting financial securities

Chart.js Financial Charting Chart.js module for Candlestick and OHLC charts Roadmap Chart.js 2.7.0 added our timeseries scale as new option called dis

Chart.js 630 Dec 29, 2022