Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call controller / scope function from as valueFormatFunction #155

Open
gadeynebram opened this issue Jan 16, 2017 · 1 comment
Open

call controller / scope function from as valueFormatFunction #155

gadeynebram opened this issue Jan 16, 2017 · 1 comment

Comments

@gadeynebram
Copy link

gadeynebram commented Jan 16, 2017

Hi,

Great library!

Is it possible to call a function from your controller or scope as the valueFormatFunction in chart-tooltip?

This does not work:

<div ng-controller="C3ChartController as chartCtrl"> <c3chart ....> <chart-tooltip valueFormatFunction="chartCtrl.formatValue(value)"></chart-tooltip> </<c3chart> </div>

or something like this does not either

<chart-tooltip valueFormatFunction="angular.element(document.getElementById('line-chart-{{$index + 1}}')).controller().formatValue(value)"></chart-tooltip>

@NitsanBaleli
Copy link

NitsanBaleli commented Sep 17, 2018

@gadeynebram
You need to use it like this:

value-format-function="chartCtrl.formatValue"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants