-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
How to make changes to the widget definitions at runtime, like this ?
I want to change the title when user change language.
var widgetDefinitions = [
{
name: 'wt-line-chart',
title: $scope.translation.income,
attrs: { chart: 'chart' },
size: {
width: '50%',
height: '300px'
},
enableVerticalResize: true
},
{
name: 'wt-pie-chart',
title: $scope.translation.performance,
attrs: {
data: 'pieChartData'
},
size: {
width: '50%',
height: '300px'
},
enableVerticalResize: true
}
];
var defaultWidgets = _.map(widgetDefinitions, function (a) {
return {name: a.name};
});
$scope.dashboardOptions = {
widgetDefinitions: widgetDefinitions,
defaultWidgets: defaultWidgets,
hideToolbar: true,
hideWidgetName: true,
hideWidgetSettings: true
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels