willsoto / ng-chartist

Angular component for Chartist.js
Apache License 2.0
126 stars 44 forks source link

Get black chart #14

Closed doczoidberg closed 8 years ago

doczoidberg commented 8 years ago

I tried a simple example and only get black pie charts. Any idea why?

TS:

export class Dashboard {
public chart: any;

    constructor(...) {
       this.chart = {
            type: 'Pie',
            data:  {
                    series: [10, 20, 50, 20, 5, 50, 15],
                    labels: [1, 2, 3, 4, 5, 6, 7]
                }
            ,
            options: {
                donut: false,
                donutWidth: 10,
                showLabel: false
            }
        }

Template:

    <x-chartist [data]="chart.data"
                        [type]="chart.type"
                        [options]="chart.options">
     </x-chartist>
doczoidberg commented 8 years ago

I had to include the css file of course.

<link rel="stylesheet" href="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.css">

RafaelKampa commented 11 months ago

Any answers on how to solve this?

hakimio commented 11 months ago

There is one just above your question?

RafaelKampa commented 11 months ago

Sorry, I had copied the text of the comment from somewhere else and ended up accidentally pasting it instead of thanking for the solution hahahah.