2016-12-27 67 views
0

以下是我正在使用的格式化程序。Vaadin圖表工具提示格式

Tooltip tooltip = new Tooltip(); 
tooltip.setxDateFormat("MMM dd, YYYY"); 
tooltip.setFormatter("function() { var d = new Date(this.x);" + "return " + "'<b>'+this.series.name +'</b><br/>" 
       + "<strong>Value :</strong> '+ this.y +'<br/>" + "<strong>Start Date :</strong> '+ this.x; " + "}"); 

chartConfig.setTooltip(tooltip); 

This is the tooltip I am getting

如何:保留兩位小數

2)使用日期格式像2016年11月30日

請協助的價值

1)輪。

回答

0

Vaadin圖表上的客戶端,這意味着你可以使用格式Highcharts JS的API使用Highcharts,下面的調用應該工作:

Highcharts.numberFormat(this.y, 2) 

Highcharts.dateFormat('%b %d %Y', new Date(this.x)) 
相關問題