chart

This page showcases the chart builder examples.

ChartType

ExampleDescriptionLabel
area-by-order-dateArea Chart - Sales trend by date-
bar-by-product-typeBar Chart - Sales by product type-
chart-type-switchingSwitch between line and bar chart types-
column-by-areaColumn Chart - Sales by region-
donut-by-customer-typeDonut Chart - Sales share by customer type-
line-by-provinceLine Chart - Sales trend by province-
line-chartLine Chart - Sales trend by province-
pie-by-areaPie Chart - Sales share by region-
pie-chart-measure-encodingPie Chart Measure Encoding - Test measure-encoding.ts Pie chart type-
rose-by-cityRose Chart - Sales by city-
scatter-chart-measure-encodingScatter Chart Measure Encoding - Test measure-encoding.ts Scatter chart type-
scatter-sales-profitScatter Chart - Relationship between Sales and Profit-

Dimensions

ExampleDescriptionLabel
add-date-dimension-yearAdd date dimension with yearly aggregation-
add-dimensionAdd dimension-
add-multiple-dimensionsAdd multiple dimensions (chained calls)-
mixed-date-and-normal-dimensionsMixed grouping with regular dimension and quarterly-aggregated date dimension-
remove-dimensionRemove dimension-
update-date-dimension-monthUpdate existing date dimension to monthly aggregation-
update-dimensionUpdate dimension-

HavingFilter

ExampleDescriptionLabel
add-having-filterFilter high-performing regions with sales over 1M after grouping by region-
add-multiple-having-filterChain multiple Having conditions to filter regions with high sales and high profit-
clear-having-filterClear all Having filter conditions to display full grouped aggregation results-
having-array-value-with-in-operatorHaving filter with array value that triggers 'in' operator conversion-
having-array-value-with-not-in-operatorHaving filter with array value that triggers 'not in' operator conversion-
having-clear-and-rebuildClear existing having conditions and rebuild new group filters, simulating user resetting the filter panel and reconfiguring-
having-deeply-nested-groupsThree-level nested grouping: OR(AND(Sales > 500K, Profit > 50K), AND(Quantity > 100, Avg Discount < 0.3)), simulating complex business filtering-
having-empty-dsl-compose-targetStarting from an empty DSL, use builder to assemble where/having/measures/dimensions, including having conditions combining sum and countDistinct aggregations-
having-field-not-in-measures-and-dimensionsInitialize empty DSL, only add dimension area and measure sales via builder, and use the profit field (SUM(profit) > 100000) in having that does not appear in measures/dimensions-
having-find-and-updateAdd having conditions first, then use find to locate and dynamically update thresholds and operators, simulating interactive user filter adjustment-
having-group-add-to-existingAppend new conditions to an existing having group, simulating a user progressively refining filter rules-
having-group-remove-conditionRemove a specific condition from an existing having group, simulating a user canceling a filter-
having-mix-filters-and-groupsMix standalone filter conditions with OR groups: Sales > 500K AND (Profit > 100K OR Quantity >= 30)-
having-multi-dimension-aggregateGroup by two dimensions (category and region), filter combinations where avg discount < 20% and total sales > 100K, analyzing high-value low-discount business-
having-nested-groupsNested grouping: AND(Sales > 1M, OR(Profit > 200K, Quantity >= 50))-
having-or-groupUse OR grouping to filter regions with high sales or high profit-
having-scatter-profit-analysisScatter chart analysis: Group by category to filter categories with high profit rate and transaction count > 20, identifying high-quality business-
having-update-group-operatorUpdate the logical operator of an existing Having group from AND to OR-
having-with-where-combinedCombined where and having filtering: first filter office products category with where, then filter provinces with sales > 50K or profit > 10K with having-
remove-having-filterRemove redundant Having filter conditions, keeping only the profit filter-

Locale

ExampleDescriptionLabel
en-US-localeEnglish locale tests-
zh-CN-localeChinese locale tests-

Measures

ExampleDescriptionLabel
add-measureAdd measure-
add-measure-encodingAdd measure and set encoding-
measure-with-custom-and-auto-formatMeasure formatting: Sales uses 10K (10,000) custom format (¥ prefix, 2 decimal places), Profit growth uses auto formatting, and Discount uses percentage format-
remove-measureRemove measure-
update-measureUpdate measure-

Theme

ExampleDescriptionLabel
dark-themeDark theme charts-
light-themeLight theme charts-

UndoManager

ExampleDescriptionLabel
undo-redoUndo/Redo tests-

WhereFilter

ExampleDescriptionLabel
between-sales-range-analysisSales range analysis: Use 'between' to filter orders between 1000 and 10000, summarized by category profit.-
clear-and-rebuild-filtersClear and rebuild filters: Clear old simple filters and rebuild complex conditions with grouping.-
date-filter-period-and-range-comboDate range combined filter: Use 'period' to filter 2024 Q1 data, while using 'range' to limit profit range, cross-analyzed by category and shipping mode-
date-filter-relative-with-nested-conditionsDate filter and nested conditions combo: Filter high-value orders from Consumers or Corporate customers within the last 30 days, statistics by province-
deeply-nested-or-and-groupsMulti-level nested grouping: High-value orders with Same Day shipping for Consumers or First Class shipping for Corporate customers, three levels of AND/OR nesting-
high-discount-tech-profit-analysisHigh discount Technology product profit analysis: Filter technology category orders with discount > 0.5, comparing profit by region.-
in-operator-multi-area-deliveryMulti-region shipping efficiency comparison: Use 'in' to filter East China, North China, and Central South regions, statistics by shipping mode.-
nested-group-region-product-filterOffice Supplies or Furniture sales in East China: Use nested grouping, AND connecting region condition and OR category conditions.-
not-between-sales-rangeNot between filter: exclude sales between 1000~10000-
not-between-with-explicit-operatorsNot between filter with explicit leftOp/rightOp to test invert functions-
office-supplies-sales-by-provinceOffice Supplies sales ranking by province: Filter Office Supplies category, summarized by province sales.-
or-group-product-category-comparisonOffice Supplies vs. Technology category comparison: Use OR grouping to filter two categories, comparing sales by region.-
remove-condition-from-groupRemove condition from group: Pre-defined OR group with three categories, remove one via updateGroup.-
remove-filter-by-indexRemove filter by index: Remove the first category filter, keeping only the region condition.-
update-filter-switch-provinceAnimated filter modification: Update province filter from Zhejiang to Guangdong, observing sales changes.-
update-group-or-to-andModify group logic: Switch pre-defined OR category group to AND, narrowing the filter scope.-
where-filter-array-value-converts-to-inWhere filter with array value using '=' operator should convert to 'in'-
where-filter-array-value-converts-to-not-inWhere filter with array value using '!=' operator should convert to 'not in'-