ui-chart icon indicating copy to clipboard operation
ui-chart copied to clipboard

Directive looks wierd

Open fuqcool opened this issue 12 years ago • 2 comments

<ui-chart="data" chart-options="chartOptions"></ui-chart> ui-chart is both tagname and attribute, which looks confusing.

How about <ui-chart chart-data="data" chart-options="chartOptions"></ui-chart>

fuqcool avatar Sep 30 '13 15:09 fuqcool

Perhaps you would like to declare it this way: <div ui-chart="data" chart-options="chartOptions"></div>

This is what I'm doing at the moment.

gburnett avatar Oct 01 '13 18:10 gburnett

I've been wrestling with this all day, so here's my comment in case someone would fall into similar situation. It seems that using ui-chart both as a tagname and attribute is not only confusing, but also it doesn't work at all (at least w/ AngularJS 1.2.11, jqPlot 1.0.8 and jQuery 2.1.0). Changing attrs.uiChart to attrs.chartData in directive's definition and using it as @fuqcool suggested does the trick (@gburnett's answer works w/o such modifications, though).

xor-xor avatar Feb 01 '14 20:02 xor-xor