chart

This page showcases 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 test-
zh-CN-localeChinese locale test-

Measures

ExampleDescriptionLabel
add-measureAdd a measure-
add-measure-encodingAdd a measure and set encoding-
measure-with-custom-and-auto-formatMeasure formatting: sales uses a custom ten-thousand-unit format (¥ prefix, two decimals), profit margin uses automatic formatting, and discount uses percentage formatting-
remove-measureRemove a measure-
update-measureUpdate a measure-

Theme

ExampleDescriptionLabel
dark-themeDark theme chart-
light-themeLight theme chart-

UndoManager

ExampleDescriptionLabel
undo-redoUndo/redo behavior test-

WhereFilter

ExampleDescriptionLabel
between-sales-range-analysisSales range analysis: use between to filter individual orders from 1000 to 10000 and summarize profit by category-
clear-and-rebuild-filtersClear and rebuild filters: clear old simple filters and rebuild complex grouped conditions-
date-filter-period-and-range-comboDate range combined filter: use period to filter 2024 Q1 data, while range limits the profit interval, then cross-analyze by category and shipping mode-
date-filter-relative-with-nested-conditionsDate filter with nested conditions: filter high-value orders from Consumer or Corporate customers in the last 30 days and summarize sales and profit by province-
deeply-nested-or-and-groupsMulti-level nested grouping: high-value Same Day orders from Consumer customers or First Class orders from Corporate customers, using three levels of AND/OR nesting-
high-discount-tech-profit-analysisHigh-discount Technology product profit analysis: filter Technology category orders with discount greater than 0.5 and compare profit by region-
in-operator-multi-area-deliveryMulti-region delivery efficiency comparison: use in to filter East China, North China, and Central South, then count orders by shipping mode-
nested-group-region-product-filterOffice Supplies or Furniture sales in East China: use nested grouping with AND connecting the region condition and OR category conditions-
not-between-sales-rangeNot between filter: exclude sales between 1000 and 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 the Office Supplies category and summarize sales by province-
or-group-product-category-comparisonOffice Supplies versus Technology category comparison: use an OR group to filter two categories and compare sales by region-
remove-condition-from-groupRemove a condition from a group: the preset OR group contains three categories, and updateGroup removes one of them-
remove-filter-by-indexRemove a filter by index: remove the first category filter and keep only the region condition-
update-filter-switch-provinceDynamically modify a filter: update the province filter from Zhejiang to Guangdong and observe sales changes-
update-group-or-to-andModify group logic: switch the preset OR category group to AND to narrow 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'-