-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DC.Capped Value Accessor Issue #338
Comments
The capped charts now call accessors like this:
I also fixed all the user settable callback functions to receive d.data, rather than just d. So we can hide the implementation details of both cases. |
Great fix. :) |
How should i do to use this functionality? |
Hi @albertotagliavini - are you looking for the documentation of the Cap Mixin, or something else? https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#cap-mixin |
I have a problem in a rowchart with cap and valueAccessor. I can't understand if i i've wrong something making the chart or there is another problem. can you post me an example of cappedValueAccessor? |
Sorry, but the issue tracker is for reporting bugs and making enhancement requests, not for general support questions. Please ask on Stack Overflow with the dc.js tag, or on the user group, and we will be glad to help you there. |
There may be harmless (but still wrong) warnings in the log, but if your chart is not displaying, please ask in one of the support forums. |
ok, thaks! sorry for the error. i've asked it here : https://stackoverflow.com/questions/31029925/dc-js-error-rowchart-with-cap-and-valueaccessor |
When creating a capped chart with a value accessor that is anything other than just returning .value as a number, the capped chart doesn't work.
_othersGrouper will return the sum of others in .value as a number. If, for example, my value accessor is returning d.value.total then the value accessor in the chart render looks to access an object and breaks when it gets to the other row.
My hack was to change my value accessor:
return typeof(d.value) == "number" ? d.value : d.value.total
Perhaps caped chart should return all rows with .value as a number?
The text was updated successfully, but these errors were encountered: