@@ -1173,7 +1173,8 @@ angular.module('patternfly.charts').directive('pfSparklineChart', ["c3ChartDefau
11731173 * <ul style='list-style-type: none'>
11741174 * <li>.chartId - the unique id of this trends chart
11751175 * <li>.title - (optional) title of the Trends chart
1176- * <li>.layout - (optional) the layout and sizes of titles and chart. Values are 'large' (default), and 'small'
1176+ * <li>.layout - (optional) the layout and sizes of titles and chart. Values are 'large' (default), 'small', 'compact', and 'inline'
1177+ * <li>.trendLabel - (optional) the trend label used in the 'inline' layout
11771178 * <li>.timeFrame - (optional) the time frame for the data in the pfSparklineChart, ex: 'Last 30 Days'
11781179 * <li>.units - unit label for values, ex: 'MHz','GB', etc..
11791180 * <li>.valueType - (optional) the format of the latest data point which is shown in the title. Values are 'actual'(default) or 'percentage'
@@ -1216,21 +1217,23 @@ angular.module('patternfly.charts').directive('pfSparklineChart', ["c3ChartDefau
12161217 <div class="col-md-3">
12171218 <form role="form" >
12181219 <div class="form-group">
1219- <label>Title Value Type</label></br>
1220- <select pf-select class="pf-select-sm" ng-model="valueType" id="valueType">
1221- <option value="actual" ng-selected="true" selected>Actual</option>
1222- <option value="percentage">Percentage</option>
1220+ <label>Layout</label></br>
1221+ <select pf-select class="pf-select-sm" ng-model="layout" id="layout">
1222+ <option value="large" ng-selected="true" selected>Large</option>
1223+ <option value="small">Small</option>
1224+ <option value="compact">Compact</option>
1225+ <option value="inline">Inline</option>
12231226 </select>
12241227 </div>
12251228 </form>
12261229 </div>
12271230 <div class="col-md-3">
1228- <form role="form" >
1231+ <form role="form" ng-hide="layout == 'inline'" >
12291232 <div class="form-group">
1230- <label>Layout </label></br>
1231- <select pf-select class="pf-select-sm" ng-model="layout " id="layout ">
1232- <option value="large " ng-selected="true" selected>Large </option>
1233- <option value="small">Small </option>
1233+ <label>Title Value Type </label></br>
1234+ <select pf-select class="pf-select-sm" ng-model="valueType " id="valueType ">
1235+ <option value="actual " ng-selected="true" selected>Actual </option>
1236+ <option value="percentage">Percentage </option>
12341237 </select>
12351238 </div>
12361239 </form>
@@ -1248,6 +1251,7 @@ angular.module('patternfly.charts').directive('pfSparklineChart', ["c3ChartDefau
12481251 'chartId' : 'exampleTrendsChart',
12491252 'title' : 'Network Utilization Trends',
12501253 'layout' : 'large',
1254+ 'trendLabel' : 'Virtual Disk I/O',
12511255 'valueType' : 'actual',
12521256 'timeFrame' : 'Last 15 Minutes',
12531257 'units' : 'MHz',
@@ -4349,7 +4353,7 @@ angular.module('patternfly.views').directive('pfDataToolbar',
43494353
43504354
43514355 $templateCache . put ( 'charts/trends/trends-chart.html' ,
4352- "<span><div ng-class=\"{'trend-card-large-pf': showLargeCardLayout,'trend-card-small-pf': showSmallCardLayout}\"><span class=trend-header-pf ng-if=config.title>{{config.title}}</span> <span ng-if=showActualValue><span class=trend-title-big-pf>{{getLatestValue()}}</span> <span class=trend-title-small-pf>{{config.units}}</span></span> <span ng-if=showPercentageValue><span class=trend-title-big-pf>{{getPercentageValue() + '%'}}</span> <span class=trend-title-small-pf>of {{chartData.total + ' ' + config.units}}</span></span><div pf-sparkline-chart config=config chart-data=chartData chart-height=getChartHeight() show-x-axis=showXAxis show-y-axis=showYAxis></div><span class=trend-footer-pf ng-if=config.timeFrame>{{config.timeFrame}}</span></div></span>"
4356+ "<span ng-switch on=config.layout><div ng-switch-default ng-class=\"{'trend-card-large-pf': showLargeCardLayout,'trend-card-small-pf': showSmallCardLayout}\"><span class=trend-header-pf ng-if=config.title>{{config.title}}</span> <span ng-if=showActualValue><span class=trend-title-big-pf>{{getLatestValue()}}</span> <span class=trend-title-small-pf>{{config.units}}</span></span> <span ng-if=showPercentageValue><span class=trend-title-big-pf>{{getPercentageValue() + '%'}}</span> <span class=trend-title-small-pf>of {{chartData.total + ' ' + config.units}}</span></span><div pf-sparkline-chart config=config chart-data=chartData chart-height=getChartHeight() show-x-axis=showXAxis show-y-axis=showYAxis></div><span class=trend-footer-pf ng-if=config.timeFrame>{{config.timeFrame}}</span></div><div ng-switch-when=compact><div class=\"row trend-row\"><div class=\"col-sm-4 col-md-4\"><div class=trend-compact-details><span ng-if=showActualValue><span class=trend-title-compact-big-pf>{{getLatestValue()}}</span> <span class=trend-title-compact-small-pf>{{config.units}}</span></span> <span ng-if=showPercentageValue><span class=trend-title-compact-big-pf>{{getPercentageValue() + '%'}}</span> <span class=trend-title-compact-small-pf>of {{chartData.total + ' ' + config.units}}</span></span> <span class=trend-header-compact-pf ng-if=config.title>{{config.title}}</span></div></div><div class=\"col-sm-8 col-md-8\"><div pf-sparkline-chart config=config chart-data=chartData chart-height=getChartHeight() show-x-axis=showXAxis show-y-axis=showYAxis></div></div></div></div><div ng-switch-when=inline><div class=\"row trend-row\"><div class=\"col-sm-8 col-md-8 trend-flat-col\"><div pf-sparkline-chart config=config chart-data=chartData chart-height=getChartHeight() show-x-axis=showXAxis show-y-axis=showYAxis></div></div><div class=\"col-sm-4 col-md-4 trend-flat-col\"><div class=trend-flat-details><div class=trend-flat-details-cell><span class=trend-title-flat-big-pf>{{getPercentageValue() + '%'}}</span></div><div class=trend-flat-details-cell><span class=trend-label-flat-strong-pf>{{config.trendLabel}}</span> <span class=trend-label-flat-pf>{{getLatestValue()}} of {{chartData.total + ' ' + config.units}}</span></div></div></div></div></div></span>"
43534357 ) ;
43544358
43554359
0 commit comments