diff --git a/CHANGELOG.md b/CHANGELOG.md index db009896f..981057ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +## [0.8.0] - 2023-07-12 + ### Fixed - Missing Area/line marker rewireing (on orientation change, diff --git a/README.md b/README.md index c5a96933d..b807b319c 100644 --- a/README.md +++ b/README.md @@ -134,13 +134,6 @@ We have a comprehensive list of features we plan to implement, on our We welcome contributions to the project, visit our [wiki page](https://github.com/vizzuhq/vizzu-lib/wiki) for further info. -Shortcuts: - -- [Report an issue](https://github.com/vizzuhq/vizzu-lib/issues), -- [Building](https://github.com/vizzuhq/vizzu-lib/blob/main/project/build.md) - and [testing](https://github.com/vizzuhq/vizzu-lib/blob/main/test/test.md) the - project. - ## Contact - Join our Slack: diff --git a/docs/tutorial/aggregating_data.js b/docs/tutorial/aggregating_data.js new file mode 100644 index 000000000..353e57b25 --- /dev/null +++ b/docs/tutorial/aggregating_data.js @@ -0,0 +1,167 @@ +const dataLoaded = import("../assets/data/music_data.js"); +const mdChartLoaded = import("../assets/javascripts/mdchart.js"); + +Promise.all([dataLoaded, mdChartLoaded]).then((results) => { + const data = results[0].default; + const MdChart = results[1].default; + const mdchart = new MdChart(data, "./vizzu.js", "tutorial"); + + mdchart.create([ + { + anims: [ + (chart) => { + return chart.animate({ + config: { + title: "Sum of all Popularity Values", + }, + }); + }, + (chart) => { + return chart.animate({ + config: { + channels: { + y: { set: "Popularity" }, + }, + }, + }); + }, + (chart) => { + return chart.animate({ + config: { + title: "Sum of Popularity by Genre", + }, + }); + }, + (chart) => { + return chart.animate({ + config: { + channels: { + x: { set: "Genres" }, + }, + }, + }); + }, + ], + }, + { + anims: [ + (chart) => { + return chart.animate({ + config: { + title: "Minimum of Popularity by Genre", + }, + }); + }, + (chart) => { + return chart.animate({ + config: { + channels: { + y: { set: "min(Popularity)" }, + }, + }, + }); + }, + ], + }, + { + anims: [ + (chart) => { + return chart.animate({ + config: { + title: "Maximum of Popularity by Genre", + }, + }); + }, + (chart) => { + return chart.animate({ + config: { + channels: { + y: { set: "max(Popularity)" }, + }, + }, + }); + }, + ], + }, + { + anims: [ + (chart) => { + return chart.animate({ + config: { + title: "Mean of Popularity by Genre", + }, + }); + }, + (chart) => { + return chart.animate({ + config: { + channels: { + y: { set: "mean(Popularity)" }, + }, + }, + }); + }, + ], + }, + { + anims: [ + (chart) => { + return chart.animate({ + config: { + title: "Count of items by Genre", + }, + }); + }, + (chart) => { + return chart.animate({ + config: { + channels: { + y: { set: "count()" }, + }, + }, + }); + }, + ], + }, + { + anims: [ + (chart) => { + return chart.animate({ + config: { + title: "Distinct Kinds by Genre", + }, + }); + }, + (chart) => { + return chart.animate({ + config: { + channels: { + y: { set: "distinct(Kinds)" }, + }, + }, + }); + }, + ], + }, + { + anims: [ + (chart) => { + return chart.animate({ + config: { + title: "Sum of Popularity by Genre", + }, + }); + }, + (chart) => { + return chart.animate({ + config: { + channels: { + y: { set: "sum(Popularity)" }, + }, + }, + }); + }, + ], + }, + ]); +}); diff --git a/docs/tutorial/aggregating_data.md b/docs/tutorial/aggregating_data.md new file mode 100644 index 000000000..53facd514 --- /dev/null +++ b/docs/tutorial/aggregating_data.md @@ -0,0 +1,177 @@ +--- +data_url: ../../assets/data/music_data.js +--- + +# Aggregating data + +The default logic of `Vizzu` is to show the sum of values that are in the +categories added to a chart. So if we create a simple vertical bar chart by +adding the `Popularity` measure to the y-axis, the height of the bar will be the +sum of all `Popularity` values and when we add `Genres` to the x-axis, the +height of the bars will be the sum of `Popularity` values in each category +within `Genres`. + +
+ +??? info "Info - How to setup Vizzu" + In `HTML`, create a placeholder element that will contain the rendered + chart. + + ```html + + +Genres | |||||
---|---|---|---|---|---|