MultiBar Chart with multiple ng-repeat


#1

Hello All

Is it possible to have multiple ng-repeats for a multiBar chart? E.g. repeat the x-axis value (Month) and repeat the series (Measure) both from element lists?

Thanks
David


#2

Hi David,

Yep, that should be possible (I haven’t tested it though).


#3

Hi Tim

A possible solution came to me last night actually. I needed to nest the tm1-ui-chart-dbr inside a div, with the div holding the series ng-repeat, and the tm1-ui-chart-dbr holding the label ng-repeat:

<div ng-repeat="commodity in lists.commodity">
	<tm1-ui-chart-dbr ng-repeat="month in lists.monthRolling" tm1-instance="veolia" tm1-cube="WAS Route Profitability" tm1-series="{{commodity.key}}" tm1-label="{{month.PeriodName}}" tm1-elements='...' ></tm1-ui-chart-dbr>	 
</div>

I’ve tested it this morning and it’s working fine.

Cheers
David


#4

Hi I have used ng-repeat for multi-series in the below way using span tag …it is working fine, I have used tm1-ui-chart-value as I get all my data from a service. below code snippet is to be written inside tm1-ui-chart

  <span ng-repeat="itemAry in $ctrl.multiChartData"> 
<tm1-ui-chart-value
   ng-repeat="item in itemAry.data"
   tm1-label="{{item.label}}"
   tm1-value="{{item.value}}" 
   tm1-series="{{itemAry.title}}" >
</tm1-ui-chart-value>
</span>

Thanks,
Sridhar V