Skip to content

How can I use summarizeMomentGranularity #27

Answered by pbeshai
arnaudcol asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, good question. I'll update the docs to be more clear. In this case, since it depends on moment, you need to install a separate package. If you're using npm, you'd do this as follows:

npm install @tidyjs/tidy-moment moment

Then you could use it:

import { summarizeMomentGranularity } from '@tidyjs/tidy-moment';

If you're using the unpkg CDN, you would import it: (note that the order of the script tags matters)

<!-- tidy + dependencies -->
<script src="https://d3js.org/d3-array.v2.min.js"></script>
<script src="https://www.unpkg.com/@tidyjs/tidy/dist/umd/tidy.min.js"></script>

<!-- tidy-moment + dependencies -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/momen…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by pbeshai
Comment options

You must be logged in to vote
5 replies
@pbeshai
Comment options

@arnaudcol
Comment options

@pbeshai
Comment options

@arnaudcol
Comment options

@pbeshai
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants