Skip to content

Creating Charts

In the created dataset, you can select the type of chart you need to create based on your requirements. According to the requirements of different categories of charts, select dimension and measure fields, and the system will automatically generate the chart. HENGSHI SENSE supports sharing charts and collaborative applications among colleagues. For the charts under this application, you can use them directly or modify them before use.

Left Data Panel

Data

Select the created dataset and use the data from this dataset to create the required charts. Datasets that have established relationships will be connected by lines.

Click the Search icon on the right side of the dataset to directly navigate to the management page of that dataset.

Fields and Metrics

  • Fields: All original fields and newly added fields in the current dataset. If the fields have grouping information, the grouping information will also be displayed in a tree structure in the field list for quick field location.

  • Calculated Metrics: All metrics newly added that depend on this dataset. The grouping information of the metrics will also be displayed in the metrics list.

  • In-chart Metrics: Dimensions and measure fields within the chart.

Drag fields to configure dimensions and measures.

Create New Field

You can add fields of text, date, and number types by calculating column values, using advanced expressions, or grouping column values.

Create New Calculated Metrics

You can add fields of text, date, and numeric types by calculating column values, using advanced expressions, or grouping column values. Non-aggregate metrics are not allowed to be added.

Create New Parameter

You can add parameters of text, number, date, and time types to achieve parameterized control of the application.

Top Right Toolbar

Auto Save

Undo and redo operations do not affect auto save.

By default, Auto Save is checked. If the user unchecks Auto Save, the page will not send requests each time the chart page is configured. Requests will only be sent when Auto Save is checked again or the Save button is clicked, at which point the chart will be re-rendered.

When Auto Save is unchecked:

  • A pause overlay will appear on the chart interface;
  • Users cannot edit fields/metrics;
  • Any ongoing drill-down will be canceled;
  • Any open detailed data pop-up windows will be closed.

Save

When Auto Save is unchecked, users can click the Save button to save after performing operations on the chart. At this time, the pause overlay still exists, and the chart will reload.

If the user does not click the Save button after performing operations on the chart and directly clicks the Refresh button or refreshes the page, a prompt will appear: "Your changes have not been saved. Are you sure you want to refresh?"

Undo

You can undo previous operations.

Redo

Redo the undone operation.

Export

Charts can be exported in three formats: PNG, PDF, and Excel aggregated result data.

Refresh

Refresh the chart data directly without using cached chart data.

SQL Debugging

When designing charts, different data is required, and the calculations for these data can range from simple to complex. Sometimes, the backend response can be slow when calculating this data. If you wish to understand the SQL being executed in the backend and troubleshoot and optimize it, you can use this feature.

SQL Debugging provides the following two functions:

  1. View SQL Code
  2. View the explain results of the SQL code's execution plan

If you find that the performance of a certain chart is not ideal, you can first check whether the executed SQL code is reasonable and whether the calculation expressions for dimensions and measures can be adjusted. Then, you can use the explain function to view the execution plan. If you find that certain operations in the execution plan are taking a long time, you can perform corresponding optimization work for different situations. For example, if most of the time in the execution plan is spent repeatedly performing table scan operations, you might consider creating some indexes on the relevant columns of the related tables to speed up the execution of the chart.

Return

Return to the Dashboard page.

View Data

View the raw data of the current chart.

Middle Toolbar

Switch Charts

Users can switch between different chart types based on their needs. Colored icons can be switched directly without the need for reconfiguration, while gray icons will not retain the dimensions and measures of the chart after switching, requiring users to reconfigure the measures and dimensions themselves.

Configuration

Select Configuration from the middle navigation bar to optimize the complete chart according to your needs.

  • Dimensions
  • Measures
  • Filters

Dimension Tools

Dimension tools include:

  • Rename: Modify the dimension name to make the content in the chart more relevant to the business scenario.
  • Display Format
  • Sort
  • Calculation: Dimension aggregation methods.
  • Merge Items: Merge items that account for a very small proportion.
  • Fill Time Points: When selecting a time dimension, the option to fill time points will appear.
  • Delete: Remove the current dimension.
Display Format

The display format for numeric types is as follows, and the number display format can be customized:

  • Decimal Places: By default, it displays 2 decimal places, and the number of decimal places can be customized.
  • Number Units: By default, it displays no units, and the number units can be customized: Auto, Hundred Million, Ten Million, Million, Ten Thousand, Thousand, Hundred, M, K.
  • Prefix/Suffix: By default, it displays no prefix/suffix, and the prefix/suffix can be customized.
  • Display Thousand Separator: By default, it is not checked, and users can customize it according to actual needs.
  • Display Percentage: By default, it is not checked, and users can customize it according to actual needs.
  • Display Scientific Notation: By default, it is not checked, and users can customize it according to actual needs.

The display format for date types is as follows, and the date display format can be customized:

Sorting

Dimension sorting criteria include: data source sorting, alphabetical, field, and manual sorting.

Click the dropdown box on the right side of the dimension field to pop up the menu, then click sort.

  • Data Source Sorting: Sort dimensions based on the storage location of the data in the database.

  • Alphabetical: Sort dimensions in alphabetical order A-Z; currently supported databases for alphabetical sorting include: Oracle, MySQL, Sqlserver, PostgreSQL, GreenPlum, and Engine.

Date and numeric type dimension fields do not support alphabetical sorting.

  • Field: You can select fields from the same dataset or related datasets, specify aggregation methods, and sort dimensions based on the aggregated results.

  • Manual Sorting: You can manually adjust the order of dimension groups.

Comparison dimension sorting includes: default, ascending, descending, and custom.

Click the dropdown box on the right side of the comparison dimension to pop up the menu, then click sort.

  • Default: By default, there is no order. If the comparison dimension selects the same field as the dimension, it will be sorted according to the order of the dimension field.

  • Ascending/Descending: When selecting ascending/descending, text type fields are sorted in alphabetical order A-Z, numeric type fields are sorted by numerical value, and date type fields are sorted by date.

  • Custom Sorting: You can manually adjust the order of comparison dimension groups.

Tip

Only tables support comparison dimensions.

Calculation

The aggregation method for non-time dimensions is grouping, while the aggregation methods for time dimensions include:

  • Millisecond
  • Second
  • Minute
  • Hour
  • Day
  • Day (Cross Week)
  • Day (Cross Month)
  • Week
  • Month
  • Month (Cross Year)
  • Quarter
  • Quarter (Cross Year)
  • Year
Merge Items

Charts with dimensions (except for maps) support merging items into "Others". When the grouped data in the display process only focuses on items with a higher proportion, items with a smaller proportion can be merged into "Others". The chart displayed after merging is more concise and clear.

The merged groups also support operations such as drilling down, viewing details, and linkage filtering.

Completing Time Points

Currently, the charts that support completing time points are:

  • Line Chart
  • Grouped Line Chart
  • Line and Bar Combination Chart
  • Area Chart
  • Grouped Area Chart
  • Stacked Area Chart
  • Stream Area Chart
  • Grouped Stacked Area Chart
  • 100% Stacked Area Chart
  • 100% Grouped Stacked Area Chart

The charts with completed time points are shown as follows:

Measurement Tools

Measurement tools include:

  • Rename: Modify the measurement name to make the content in the chart more relevant to the business scenario.
  • Display Format
  • Calculation: Measurement aggregation method.
  • Delete: Remove the current measurement.
Display Format

Non-date type fields are displayed in numeric format; date type fields are displayed in date format.

Calculation

The aggregation methods for numerical metrics are:

  • Sum
  • Average
  • Minimum
  • Maximum
  • Percentile
  • Count
  • Distinct Count
  • Duplicate
  • Retention
  • Active

The aggregation methods for non-numerical metrics are:

  • Count
  • Distinct Count
  • Duplicate
  • Retention
  • Active

Filters

Drag fields from the Fields and Metrics on the left into the Configuration -> Filters area of the chart to add filter conditions to the chart.

Fields and Metrics include Raw Fields, In-Chart Metrics, and Calculated Metrics, and are categorized by field type. You can select and add filter conditions based on your needs.

  • For text types, you can choose Exclude/Include to filter.
  • For numeric types, you can choose Range/Comparison to filter.
  • For date types, you can choose Time Period/By Year/By Quarter/By Month/Range to filter.
  • For all types, you can also enter expressions in the Expression field to filter. Functions Supported by Expressions

Tip

Filter expressions do not allow mixed operations of aggregate and non-aggregate expressions.

Drag fields into Configuration -> Filters:

Text type field filtering:

Numeric type field filtering:

Date type field filtering:

Expression filtering:

You can choose whether to display filter information during filtering:

If you choose to display filter information, the filter conditions will be shown below the chart name:

Style

The style includes the following parts:

  • Title
  • Chart Content
  • Shadow
  • X-axis
  • Y-axis
  • Legend
  • Reference Line
  • Padding

Title

You can customize the name of the chart.

Chart Content

Chart content includes the following parts:

  • Color: You can change the chart color scheme. You can choose predefined color schemes from the palette, or customize the color for each dimension group individually.

In the color settings, the Show Gradient checkbox is displayed at the bottom, allowing you to set gradients in all non-gradient color schemes for bar charts and area charts.

  • Size: You can adjust the size of the chart.

  • Labels: Chart labels can display measure values, dimension groups, and other information. You can modify the font, color, weight, text angle, position, and offset of the labels.

  • Tooltips: Tooltips can display measure values and dimension groups. You can modify the font, color, weight, border color, thickness, shape, and background color of the tooltips.

Shadow

Only charts under the bar chart grouping can set shadows. Click Style -> Shadow to set whether to display the shadow and the color of the shadow.

X-axis

You can adjust the font color, size, text angle, axis style, display axis, and tick labels.

Y-Axis

You can adjust the font color, size, text angle, axis style, display axis, tick labels, adjust the scale range, and tick marks.

Display Legend

You can set whether to display the legend and its position (left, right, or top) when displayed. You can also modify the legend's font, color, size, and whether it is bold.

Reference Line

See Reference Line for details.

Padding

Padding can control the position of the chart within the entire page.

Interaction

Interaction includes the following parts:

  • Limit Rows
  • Auto Refresh
  • Value Range Roaming
  • Time Range Roaming
  • Click Interaction in Charts
  • Drill Down Settings

Limit Rows

Users can set the number of rows displayed in the chart by Interaction -> Limit Rows, with a default value of 1000 rows.

Note

Setting this value too high can slow down both the database and the browser.

Auto Refresh

Similar to the Refresh function in dashboards, the auto refresh feature can periodically update chart data automatically. Once the auto refresh feature is enabled, you can set the update interval, and the auto refresh time value supports customization.

Charts with auto refresh set will also automatically refresh in the dashboard.

Value Range Roaming

When Value Range Roaming is enabled, a slider will appear on the dimension axis. You can adjust the currently displayed dimensions by sliding the slider, and each dimension will be proportionally redisplayed in the chart. As shown in the figure, the gray scroll bar below the dimension axis:

When some chart data has many groups (such as bar charts), but you do not want to display all groups by default, you can configure the default display range for Value Range Roaming (Data Zoom). There are four options available: "All, First M Groups, Last N Groups, Custom", to meet various configuration scenarios.

Time Roaming

Enable Show Time Roaming, drag the time field from the field list into the box, and a timeline will be displayed on the chart interface, allowing you to easily drag and view data within different time ranges. The timeline can filter data in three ways:

  • Drag the timeline to filter data

  • Select pre-defined time periods to filter data

  • Choose a time range to filter data

    • You can set the time range

    • You can drag the timeline to easily change the region

    • You can select time periods

      • All valid time
      • This year
      • This quarter
      • Last 90 days
      • This month
      • Last 30 days
      • This week
      • Last 7 days
      • Yesterday
      • Today
      • Current time

Click Interaction Behavior in Charts

Supports drill-down and exclusion chart types, see Appendix: Summary of Various Charts for details. You can set three display modes for clicking on dimension groups:

  • No response
  • Pop-up menu
  • Drill-down
No Response

Open the chart, click on the chart area and there is no response.

Pop-up Menu

Open the chart, click on the chart area, and there are three operations in the pop-up Tooltip menu: Drill Down, Exclude, and Details.

Drill Down

In charts that support drill-down, click on a dimension in the chart, and select Drill Down from the Tooltip that pops up. If a drill-down path is set, the chart will use the selected dimension as a filter condition and redraw the chart with the newly selected field as the dimension. You can drill down continuously. If no drill-down path is set, the drill-down option will not be clickable.

Exclude

Click on a dimension in the chart, and select Exclude in the pop-up Tooltip. The chart will exclude the selected dimension group and retain other dimension groups for plotting.

Details

Click on a dimension in the chart, select Details in the pop-up Tooltip, and a new window will display the detailed data of the dimension group.

Drill Down

If a drill-down path is set, opening the chart and clicking on the chart area will directly use the selected dimension as a filter condition, and redraw the chart with the newly selected field as the dimension. If no drill-down path is set, there will be no response.

Drill Down Settings

In a chart that supports drill-down, select a field and drag it into Interaction -> Drill Down Settings. Click on a dimension in the chart, and in the Tooltip menu that pops up, click Drill Down. The chart will use the selected dimension as a filter condition and redraw the chart with the newly selected field as the dimension. You can drill down continuously.

Drill-down is a temporary action and does not change the original dimensions of the chart. When we exit the chart and reopen it, the chart will return to its original state.

You can also restore the chart by clicking on the first field in the drill-down path.

Setting the Chart After Drill Down

Drag the selected field into Interaction -> Drill Down Settings, and click the icon on the left side of the drill path to set the chart type after drilling down.

Among them, charts with colored icons are selectable, while charts with gray icons are disabled. Hovering the mouse over the icon will display the required number of dimensions and measures for the current chart.

Setting the Style of the Drill-Down Chart

You can set the style of the drill-down chart, including (title, chart content, legend, and chart padding). The current chart style settings do not affect the style of the parent chart. When you return to the parent chart and drill down again, the chart style will still be the custom style.

Set/Cancel Drill Path

After dragging the selected field into Interaction -> Drill Settings, the drill path will be automatically saved.

After dragging, when opening the chart, clicking Drill will drill down step by step according to the set path. When reaching the last step, Drill will be disabled.

If you want to continue drilling down, you need to continue dragging fields into the drill settings box. After dragging, you can continue drilling down.

Clicking the leftmost dimension field in the drill path can cancel the drill path. If the drill path is canceled, the chart will automatically update to display the content before drilling down.

Cancel Drill-Down Operation

Changing the dimension field will cancel the current drill-down. However, changing the aggregation method of the date dimension will not cancel the drill-down.

During the drill-down process, clicking Exclude will cancel the drill-down.

Adding filter conditions will not cancel the drill-down, and changing measures will not cancel the drill-down.

Setting the Drill Path and Publishing

After setting the drill path, publish the app, and select Allow Drill during publishing. When opening the published or shared chart link on the Web, if the interaction is set to pop-up menu or drill, clicking on the chart will allow drilling according to the set drill path. If the interaction is set to no response, clicking on the chart will not allow drilling according to the set drill path.

Appendix: Summary of Various Charts

  • For each type of chart📈, such as pie charts, line charts, scatter plots, area charts, bar charts, etc., it is generally necessary to configure fields of different dimensions, set sort/limit options, configure filters, etc. The unified summary is as follows:
Chart TypeNumber of DimensionsNumber of MeasuresDimension SortingDrill DownLegendLegend InteractionChart LabelsLinked FilteringReference LineScale Range SettingExclusion
Bar Chart11Data Source/Alphabet/Field/Manual SortingAllowedDefault Measure RangeNoneMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Clustered Bar Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Grouped Clustered Bar Chart21Data Source/Alphabet/Field/Manual SortingAllowedSub-dimension GroupsSingle/Multiple SelectionMeasure ValueMain Dimension GroupingFixed Value/Calculated ValueAllowedMain Dimension Grouping
Grouped Stacked Bar Chart21Data Source/Alphabet/Field/Manual SortingAllowedSub-dimension GroupsSingle/Multiple SelectionMeasure ValueMain Dimension GroupingFixed Value/Calculated ValueAllowedMain Dimension Grouping
Percentage Grouped Stacked Bar Chart21Data Source/Alphabet/Field/Manual SortingAllowedSub-dimension GroupsSingle/Multiple SelectionMeasure ValueMain Dimension GroupingFixed Value/Calculated ValueAllowedMain Dimension Grouping
Horizontal Bar Chart11Data Source/Alphabet/Field/Manual SortingAllowedMeasure RangeNoneMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Horizontal Clustered Bar Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Horizontal Stacked Bar Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Horizontal Percentage Stacked Bar Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Ring Bar Chart11NoneAllowedDimension GroupsSingle/Multiple SelectionMeasure ValueDimension GroupingNot SupportedAllowedDimension Grouping
Stacked Bar Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Percentage Stacked Bar Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Box Plot11Data Source/Alphabet/Field/Manual SortingAllowedDimension GroupsSingle/Multiple SelectionNoneDimension GroupingNoneAllowedDimension Grouping
Waterfall Chart11Data Source/Alphabet/Field/Manual SortingAllowedIncrease/DecreaseSingle/Multiple SelectionMeasure ValueDimension GroupingFixed ValueNot AllowedDimension Grouping
Word Cloud11NoneAllowedMeasure RangeNoneNoneDimension GroupingNoneNot AllowedDimension Grouping
Ring Chart11Data Source/Alphabet/Field/Manual SortingAllowedDimension GroupsSingle/Multiple SelectionDimension Group PercentageDimension GroupingNoneNot AllowedDimension Grouping
Funnel Chart11Data Source/Alphabet/Field/Manual SortingAllowedDimension GroupsSingle/Multiple SelectionDimension Group/Measure Value/Conversion Rate Between GroupsDimension GroupingNoneNot AllowedDimension Grouping
Bubble Chart1~N1NoneAllowedMeasure RangeNoneDimension Group/Group PercentageCombination of Dimension GroupsNoneNot AllowedCombination of Dimension Groups
Pie Chart11Data Source/Alphabet/Field/Manual SortingAllowedDimension GroupsSingle/Multiple SelectionDimension Group PercentageDimension GroupingNoneNot AllowedDimension Grouping
Nightingale Chart11Data Source/Alphabet/Field/Manual SortingAllowedDimension GroupsSingle/Multiple SelectionDimension Group PercentageDimension GroupingNoneNot AllowedDimension Grouping
Sunburst Chart1~N1NoneAllowedNoneSingle/Multiple SelectionDimension GroupsCombination of Dimension GroupsNoneNot AllowedCombination of Dimension Groups
Treemap1~N1NoneAllowedMeasure RangeNoneDimension GroupCombination of Dimension GroupsNoneNot AllowedCombination of Dimension Groups
Area Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Grouped Area Chart21Data Source/Alphabet/Field/Manual SortingAllowedSub-dimension GroupsSingle/Multiple SelectionNoneMain Dimension GroupingFixed Value/Calculated ValueAllowedMain Dimension Grouping
Grouped Stacked Area Chart21Data Source/Alphabet/Field/Manual SortingAllowedSub-dimension GroupsSingle/Multiple SelectionMeasure ValueMain Dimension GroupingFixed Value/Calculated ValueAllowedMain Dimension Grouping
Percentage Grouped Stacked Area Chart21Data Source/Alphabet/Field/Manual SortingAllowedSub-dimension GroupsSingle/Multiple SelectionMeasure ValueMain Dimension GroupingFixed Value/Calculated ValueAllowedMain Dimension Grouping
Stacked Area Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionNoneDimension GroupingFixed ValueNot AllowedDimension Grouping
Percentage Stacked Area Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionNoneDimension GroupingFixed ValueNot AllowedDimension Grouping
Line Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Line-Bar Combination Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueAllowedDimension Grouping
Grouped Line Chart21Data Source/Alphabet/Field/Manual SortingAllowedSub-dimension GroupsSingle/Multiple SelectionMeasure ValueMain Dimension GroupingFixed Value/Calculated ValueAllowedMain Dimension Grouping
Pareto Chart11NoneAllowedFrequency/Cumulative FrequencySingle/Multiple SelectionMeasure ValueDimension GroupingFixed Value/Calculated ValueNot AllowedDimension Grouping
Arc Diagram20Data Source/Alphabet/Field/Manual SortingAllowedSub-dimension GroupsNoneNoneNoneNoneNot AllowedNone
Chord Diagram21Data Source/Alphabet/Field/Manual SortingAllowedDimension GroupsHover OnlyDimension GroupsNoneNoneNot AllowedNone
Heatmap21Data Source/Alphabet/Field/Manual SortingAllowedMeasure RangeNoneMeasure ValueCombination of Dimension GroupsNoneNot AllowedCombination of Dimension Groups
Radar Chart11~NData Source/Alphabet/Field/Manual SortingAllowedEach MeasureSingle/Multiple SelectionDimension Group/Measure ValueDimension GroupingNoneAllowedNone
Sankey Diagram1~N1Data Source/Alphabet/Field/Manual SortingAllowedNoneNoneDimension GroupsNoneNoneNot AllowedNone
Scatter Plot13NoneAllowedSize Measure RangeNoneDimension GroupsDimension GroupingFixed Value/Calculated ValueAllowed to Set, Not Allowed to MergeDimension Grouping
Dashboard02NoneNot AllowedNoneNonePercentage Measure Name/Number/PercentageNoneFixed ValueNot AllowedNone
KPI01~NNoneNot AllowedNoneNoneNoneNoneNoneNot AllowedNone
Metric Trend Card11~NNoneNot AllowedNoneNoneNoneNoneNoneNot AllowedNone
Table0~N0~NData Source/Alphabet/Field/Manual SortingNot AllowedNoneNoneNoneNoneNoneNot AllowedNone

HENGSHI SENSE Platform User Manual