jettro / jettro/c3-angular-directive

Dynamic Columns and Points?

Open
#74 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
201
Forks
96
PR merge metrics
No merged PRs in 30d

Description

I have a problem with C3 chart library when I use joint with AngularJS. I have a bar and pie chart, and I need that the columns and points would be dynamics. But when I use dynamic columns, the chart becomes unformatted.
Chart code:

```

```

Controller Code:

```
function TiposProtocolosPeriodoCtrl($scope) {

$scope.datapoints = [];
$scope.datacolumns = [];
$scope.datax = {
'id': 'categoria'
};

$scope.formatPie = function(value) {
return value;
};

$scope.$on('atualizarGraficoTiposProtocolosPeriodo', function(event, data) {
$scope.datapoints = data.datapoints;
$scope.datacolumns = data.datacolumns;...});
```

At times, I need two columns, other 4 columns.
In fact, it comes from the database.

Is there any way that leaves the formatted chart?

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.