2016-12-27 66 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)) 
相关问题