Skip to content

Commit

Permalink
Merge pull request #990 from jpwhite4/chartportlet
Browse files Browse the repository at this point in the history
Update ChartPortlet for UI consistency.
  • Loading branch information
jpwhite4 authored Jul 26, 2019
2 parents 2fd23bd + 4ab8692 commit 6709325
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions html/gui/js/modules/summary/ChartPortlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ XDMoD.Modules.SummaryPortlets.ChartPortlet = Ext.extend(Ext.ux.Portlet, {
initComponent: function () {
var self = this;

this.title = this.config.chart.title;
if (this.title.length > 60) {
this.title = this.title.substring(0, 57) + '...';
}
this.title = Ext.util.Format.ellipsis(this.config.chart.title, 60, true);

// Sync date ranges
var dateRanges = CCR.xdmod.ui.DurationToolbar.getDateRanges();
Expand All @@ -40,6 +37,8 @@ XDMoD.Modules.SummaryPortlets.ChartPortlet = Ext.extend(Ext.ux.Portlet, {
this.config.chart.end_date = date.end.format('Y-m-d');
}

this.title += ' - ' + this.config.chart.start_date + ' to ' + this.config.chart.end_date;

var highchartConfig = {};
jQuery.extend(true, highchartConfig, this.config.chart);
highchartConfig.title = '';
Expand Down

0 comments on commit 6709325

Please sign in to comment.