keen / keen-js

https://keen.io/ JavaScript SDKs. Track users and visualise the results. Demo http://keen.github.io/keen-dataviz.js/
MIT License
578 stars 143 forks source link

Override Labels with Dataviz() #309

Closed aegbertjr closed 9 years ago

aegbertjr commented 9 years ago

Hello,

I love the Keen Dashboards. I have noticed my labels stopped overriding some time after version 3.2.3. I verified that if I dial my version back to 3.2.3 the following still overrides my labels as expected:

''' theChart = new Keen.Dataviz() .el(document.getElementById('conversion-chart')) .chartType('columnchart') .labels(['A', 'B', 'C']) .chartOptions({ legend: { position: 'none' }, orientation: 'horizontal' }) .width(800) .height(300) .prepare(); '''

Perhaps related to: https://github.com/keen/keen-js/issues/299

aegbertjr commented 9 years ago

...probably worth nothing that this is for a funnel.

dustinlarimer commented 9 years ago

Hey, @aegbertjr – this was patched back up (#299) and clarified in v3.2.6: Release: https://github.com/keen/keen-js/releases/tag/v3.2.6 Docs: https://github.com/keen/keen-js/tree/master/docs/dataviz#labelsarray

Would you mind upgrading and letting me know if the problem persists? Thanks!

aegbertjr commented 9 years ago

Thanks for the response! It came down to the order of execution....thanks for taking the time to push me to the link. I will close!

Important note about .labels() (Dataviz): this method must be called after .data(), .parseRequest(), or .parseRawData(), and before .render() to take effect. This method executes a one-time, permanent modification of the underlying Dataset instance, and will be overwritten every time the chart consumes new data.