Zen33 / vue-sparklines

Sparkline chart built with Vue.
MIT License
66 stars 23 forks source link

tooltip属性的参数能不能加上数据的索引值 #2

Closed legendjslc closed 6 years ago

legendjslc commented 6 years ago

// tooltip属性(通常用于自定义提示信息, formatter方法参数为数据value和颜色color对象) spTooltipProps3: { formatter (val) { return当前数据为: } } 按文档所说, formatter方法参数为数据value和颜色color对象。能不能再加上一个数据的索引值,这样就可以让tooltip显示更灵活,比如显示为:{某天}:{数据值}。

谢谢你辛勤的开发。

Zen33 commented 6 years ago

最近会更新一版,会引入索引值,感谢建议。

Zen33 commented 6 years ago

刚刚版本已更新,formatter中的val已存在index属性即对应索引值,请更新版本后尝试,感谢使用。