{"action":"created","issue":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/1874","labels_url":"https://api.github.com/repos/ecomfe/echarts/issues/1874/labels{/name}","comments_url":"https://api.github.com/repos/ecomfe/echarts/issues/1874/comments","events_url":"https://api.github.com/repos/ecomfe/echarts/issues/1874/events","html_url":"https://github.com/ecomfe/echarts/issues/1874","id":98314655,"number":1874,"title":"axisPointer 显示时间坐标的问题","user":{"login":"tianshizanghuaWY","id":13582379,"avatar_url":"https://avatars.githubusercontent.com/u/13582379?v=3","gravatar_id":"","url":"https://api.github.com/users/tianshizanghuaWY","html_url":"https://github.com/tianshizanghuaWY","followers_url":"https://api.github.com/users/tianshizanghuaWY/followers","following_url":"https://api.github.com/users/tianshizanghuaWY/following{/other_user}","gists_url":"https://api.github.com/users/tianshizanghuaWY/gists{/gist_id}","starred_url":"https://api.github.com/users/tianshizanghuaWY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianshizanghuaWY/subscriptions","organizations_url":"https://api.github.com/users/tianshizanghuaWY/orgs","repos_url":"https://api.github.com/users/tianshizanghuaWY/repos","events_url":"https://api.github.com/users/tianshizanghuaWY/events{/privacy}","received_events_url":"https://api.github.com/users/tianshizanghuaWY/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-31T04:36:58Z","updated_at":"2015-07-31T08:25:30Z","closed_at":null,"body":"图形的x轴是Time类型，y轴是doubel型；  使用axisPointer显示当前坐标的时候，x轴会显示一个long型的数字，而不是具体的时间，请教下如何让其显示时间而不是数字呢，谢谢！"},"comment":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/comments/126606204","html_url":"https://github.com/ecomfe/echarts/issues/1874#issuecomment-126606204","issue_url":"https://api.github.com/repos/ecomfe/echarts/issues/1874","id":126606204,"user":{"login":"tianshizanghuaWY","id":13582379,"avatar_url":"https://avatars.githubusercontent.com/u/13582379?v=3","gravatar_id":"","url":"https://api.github.com/users/tianshizanghuaWY","html_url":"https://github.com/tianshizanghuaWY","followers_url":"https://api.github.com/users/tianshizanghuaWY/followers","following_url":"https://api.github.com/users/tianshizanghuaWY/following{/other_user}","gists_url":"https://api.github.com/users/tianshizanghuaWY/gists{/gist_id}","starred_url":"https://api.github.com/users/tianshizanghuaWY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianshizanghuaWY/subscriptions","organizations_url":"https://api.github.com/users/tianshizanghuaWY/orgs","repos_url":"https://api.github.com/users/tianshizanghuaWY/repos","events_url":"https://api.github.com/users/tianshizanghuaWY/events{/privacy}","received_events_url":"https://api.github.com/users/tianshizanghuaWY/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T08:25:30Z","updated_at":"2015-07-31T08:25:30Z","body":"自己找到解决的方法：在build 版本的echart.js 中去找 ‘_styleAxisPointer:function’ 有code为\r\nelse if(\"cross\"===c){\r\n\t\tvar f=m.cross.width;\r\n                //-------------------------------------------------\r\n                这段code是我加的\r\n\t        var yValue = this.component.xAxis.getAxis(0).getValueFromCoord(r);\r\n\t\tif('time' == this.component.xAxis.getAxis(0).option.type){\r\n\t\t\tyValue = getDateStrByDate(yValue); //在下面会用到yValue 显示 ‘text’\r\n\t\t}\r\n                //-------------------------------------------------\r\n\t\t\r\n\t\tthis._axisCrossShape.style={\r\n\t\t\tbrushType:\"stroke\",rect:this.component.grid.getArea(),\r\n\t\t\tx:this.subPixelOptimize(r,f),\r\n\t\t\ty:this.subPixelOptimize(s,f),\r\n\t\t\ttext:(\"(\"+ yValue  +\" , \"\r\n\t\t\t+this.component.yAxis.getAxis(0).getValueFromCoord(s)+\")\")\r\n\t\t\t\t.replace(\"  , \",\" \")\r\n\t\t\t\t.replace(\" ,  \",\" \"),\r\n\t\t\ttextPosition:\"specific\",\r\n\t\t\tstrokeColor:m.cross.color,\r\n\t\t\tlineWidth:f,\r\n\t\t\tlineType:m.cross.type},\r\n\r\n///ps:  我的tooltip是这么设置的\r\n                                     tooltip : {\r\n\t\t\t\t\t\ttrigger: 'axis',//\r\n\t\t\t\t\t\tshowContent :false,\r\n\t\t\t\t\t\taxisPointer:{\r\n\t\t\t\t\t\t\tshow: true,\r\n\t\t\t\t\t\t\ttype : 'cross',\r\n\t\t\t\t\t\t\tlineStyle: {\r\n\t\t\t\t\t\t\t\ttype : 'dashed',\r\n\t\t\t\t\t\t\t\twidth : 1\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t   }\r\n\t\t\t\t\t},\r\n"}}