Skip to content
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

Custom Granularity does not work with resultset.chartPivot() #8747

Open
dvalemark opened this issue Sep 26, 2024 · 0 comments
Open

Custom Granularity does not work with resultset.chartPivot() #8747

dvalemark opened this issue Sep 26, 2024 · 0 comments

Comments

@dvalemark
Copy link

Describe the bug
When using the new custom granularity option for a query and use the chartPivot() on the resultset it throws the error:
"Error: Unsupported time granularity: sunday_week"

The data returned by the query is correct and the query itself works great with the custom granularity.

To Reproduce
Steps to reproduce the behavior:

  1. Create a custom granularity in model
  2. Create a query using the custom granularity
  3. Use .chartPivot() function on the result
  4. See error

Expected behavior
I expected the .chartPivot() to be able to handle the new custom granularity

Screenshots
Screenshot 2024-09-26 at 11 17 23

Version:
0.36.2

Additional context
When looking through your code in cubejs-client-core/src/ResultSet.js line 355 i found a check to ensure granularity was part of the TIME_SERIES variable. The TIME_SERIES variable doesn't seem to support custom granularity, I'm not sure if this was to be included in the release with custom granularity or not but I wanted to raise the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant