-
Notifications
You must be signed in to change notification settings - Fork 90
pfCharts: Component Conversion #384
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
pfCharts: Component Conversion #384
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, a few issues found.
I'd like to see the colors and possibly thresholds in the heat map and in some of the tests use patternfly settings but that should likely be addressed elsewhere.
@@ -64,6 +64,7 @@ | |||
} | |||
|
|||
$scope.submitform = function (val) { | |||
console.log("submitform"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove console.log
chartData = ctrl.config; | ||
if (chartData) { | ||
chartData.bindto = '#' + ctrl.id; | ||
$log.info(" -> C3 chart generatd: " + chartData.bindto); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it necessary to $log this?
}; | ||
angular.module('patternfly.charts').component('pfC3Chart', { | ||
bindings: { | ||
id: '@?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to bind to id or can we just inject $attrs and get it from there?
items.push({ | ||
text: ctrl.legend[index], | ||
color: ctrl.legendColors[index] | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe legendItems would need to be updated if ctrl.legend changes. Looks like an existing issue.
<div ng-if="!loadingDone" class="spinner spinner-lg loading"></div> | ||
<div ng-if="showLegend" pf-heatmap-legend legend="legendLabels" legend-colors="heatmapColorPattern"></div> | ||
<pf-empty-chart ng-if="$ctrl.chartDataAvailable === false" chart-height="$ctrl.height"></pf-empty-chart> | ||
<!--div ng-if="!$ctrl.loadingDone" class="spinner spinner-lg loading"></div--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover comment?
</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> | ||
<span class="trend-label-flat-strong-pf">{{$ctrl.nfig.trendLabel}}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be $ctrl.config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, great catch!
</div> | ||
<div> | ||
<span> of {{chartData.total}} {{config.units}}</span> | ||
<span> of {{$ctrl.hartData.total}} {{$ctrl.config.units}}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be $ctrl.chartData
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, another great catch, thanks!
Hi @jeff-phillips-18 ,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Updated the following charts:
Only issue was that pfHeatMap still uses the following to compile it's tooltips:
Will address in a follow up story: PTNFLY-2068