Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- aliases:
- tags:
- date-created: 2022-11-13
- date-modified: 2022-11-14
- title: New Notes per Day
- ---
- %% [[2022-11-13]] %%
- ##### New Notes this week
- ```dataviewjs
- const rawData = await dv.query('TABLE length(rows.file.name) FROM "" FLATTEN dateformat(file.ctime, "yyyy-MM-dd") AS D GROUP BY D SORT D DESC LIMIT 7 ');
- const rows = rawData.value.values;
- const chartData = {
- type: 'bar',
- data: {
- labels: rows.map(x => x[0]),
- datasets: [{
- label: 'Notes per day',
- data: rows.map(x => x[1]),
- backgroundColor: ['#80bfff'],
- borderWidth: 2,
- barThickness: 50,
- borderColor: ['#80bfff'],
- }],
- },
- options: {
- indexAxis: 'x',
- plugins: {
- legend: false,
- },
- },
- };
- this.container.style.width = "85%";
- this.container.style.margin = "auto";
- window.renderChart(chartData, this.container);
- ```
- %%
- ## Data
- ```dataview
- TABLE
- length(rows.file.name) as Qty
- FROM ""
- flatten dateformat(file.ctime, "yyyy-MM-dd") as Date
- group by Date
- sort Date
- ```
- %%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement