chart-simpleChart By Category X

Visualize categorical data distributions with customizable aggregation methods and flexible chart types for section-specific reporting

Specs

Label
Value

Version

0.1.0 (updated on 2025-04-20)

Developer

Labii Inc.

Type

Section

Support Configuration

Yes

Overview

The Chart By Category X widget generates interactive visualizations based on categorical data within your experimental records and sections. By leveraging Select or ForeignKey columns to categorize data, this widget displays record counts or aggregated numeric values across different categories, making it ideal for analyzing distributions, comparing groups, and tracking trends. With support for multiple aggregation methods (sum, average, max, min, median), flexible axis formatting, and optional grouping capabilities, this widget transforms tabular data into clear, actionable insights directly within your laboratory workflows.

Use Cases

  • Sample Distribution Analysis: Visualize how samples are distributed across different treatment groups, cell lines, or experimental conditions

  • Treatment Comparison: Compare numeric measurements (concentration, purity, yield) across different treatment categories or protocols

  • Quality Control Monitoring: Track test results, pass/fail rates, or inspection outcomes across product batches or quality categories

  • Experiment Progress Tracking: Monitor task completion status, workflow stages, or milestone achievement within project sections

  • Inventory Analysis: Display reagent usage, stock levels, or consumption patterns categorized by supplier, location, or type

  • Personnel Productivity: Analyze record creation, experiment completion, or task assignments across team members

  • Equipment Utilization: Track instrument usage, maintenance status, or availability across different equipment categories

  • Time-Based Categorization: Visualize data distributions across time periods (weekly, monthly) when using date-based categorical columns

Interface

Read-only View

The read-only view displays an interactive bar chart with categories on the x-axis and counts or aggregated values on the y-axis. The visualization is contained within the section and automatically updates based on your configuration settings.

  • Data Display: Bar chart showing categorical data with clearly labeled axes and color-coded series

  • Interactive Features: Hover over bars to view exact values and category labels

  • Chart Interactions: Visual representation updates dynamically when underlying data changes (if auto-update is enabled)

  • Export Access: Download button available for extracting source data for external analysis

Read-only view of Chart By Category X widget displaying categorized data
The read-only view shows a bar chart with categories on the x-axis and aggregated values on the y-axis, providing clear visualization of data distributions

Edit View

The edit view is not applicable for this widget as it is designed purely for data visualization and reporting. All configuration and customization is performed through the widget settings panel accessible via the configure button in the widget header. The widget automatically generates visualizations based on the configured parameters without requiring direct editing of the chart itself.

Configuration

Initial Setup

1

Add the Chart By Category X widget to your section by clicking Add Widget and selecting Chart By Category X from the Data Driven Charts category

2

Click the Configure button or settings icon in the widget header to open the configuration panel

3

Configure the data source and visualization parameters as described below

Required Settings

These settings must be configured for the widget to function properly:

  • Table: Select the table that contains the data you want to visualize. This selection updates the available columns in other configuration options

Optional Settings

Customize your visualization with these optional parameters:

Data Filtering and Source

  • Query: Enter a query string to filter which records are included in the chart. Leave empty to include all records from the selected table

  • X axis: Choose a column for the x-axis categories. Select or ForeignKey columns work best for categorical data. If nothing is selected, the record name will be used as the x-axis

X Axis Configuration

  • X axis sorting: Define how categories are ordered on the x-axis

    • String (A-Z): Alphabetical ascending order

    • String (Z-A): Alphabetical descending order

    • RID (Ascending): Sort by record ID in ascending order

    • RID (Descending): Sort by record ID in descending order

  • X axis format: Control how ForeignKey values are displayed on the x-axis

    • Full (UID: Name): Shows complete reference (e.g., 'TRT24: Untreated Control')

    • Name only: Shows only the name portion (e.g., 'Untreated Control'), grouping records with identical names together

Data Series and Aggregation

  • Series: Choose one or more columns for the data series. Number, Formula, or Consumption widgets must be used in the column. If no series is selected, the widget displays record counts by default

  • Group: Select a column to create grouped visualizations. When a group is specified, the x-axis values become categories, group values become series, and series values are aggregated for each combination, enabling multi-dimensional analysis

  • Data aggregation: Define how numeric values are combined

    • None: Display raw values without aggregation

    • Sum: Calculate the total of all values (default if no series is selected)

    • Average: Calculate the mean of all values

    • Max: Display the maximum value

    • Min: Display the minimum value

    • Median: Calculate the median value

Visualization Customization

  • Chart title: Provide a descriptive title for your chart. This title appears at the top of the visualization

  • Height: Set the chart height in pixels. Default is 250px. Adjust based on the complexity of your data and available section space

Auto-Update Settings

  • Should auto update: Enable to automatically recalculate and refresh the chart when underlying data changes, ensuring visualizations stay current with laboratory data

  • Should auto update when empty: Enable to automatically perform calculations even when the widget initially has no data

1

Select your Table to define the data source

2

Choose an X axis column to define your categories (Select or ForeignKey columns recommended)

3

Optionally select a Series column to aggregate numeric values, or leave empty to count records

4

Configure X axis sorting and X axis format to control category display

5

Select a Data aggregation method if you're working with numeric series

6

Add a Chart title and adjust Height as needed

7

Enable Should auto update if you want real-time chart updates

8

Click Save to apply your configuration

circle-info

The widget requires at least one column with a Select or ForeignKey widget for categorical data. For numeric aggregation, you'll need columns with Number, Formula, or Consumption widgets.

Advanced Configuration

For complex analytical scenarios:

1

Use the Group option to create multi-dimensional visualizations with categories, groups, and aggregated series

2

Combine Query filters with X axis selections to focus on specific data subsets

3

Use X axis format set to "Name only" when working with ForeignKey references that share common names but different IDs

4

Experiment with different Data aggregation methods to discover various insights in your data

circle-exclamation

Additional Functions

Data Export

Export the underlying data used to generate your chart for external analysis or record keeping:

1

Locate the Download button in the widget interface (typically in the widget header or below the chart)

2

Click Download to export the aggregated data

3

Save the downloaded file to your desired location

The exported data includes:

  • Category values from the x-axis

  • Aggregated or count values for each category

  • Group information if grouping is configured

  • Series data if multiple series are selected

Use exported data for:

  • Import into external analysis tools (Excel, R, Python, GraphPad)

  • Creating custom reports and presentations

  • Archive analytical results for compliance documentation

  • Share insights with stakeholders who need raw data

Auto-Update Functionality

The Chart By Category X widget supports automatic chart refreshing to keep visualizations synchronized with changing data:

1

Enable Should auto update in the widget configuration

2

The widget will monitor the source table for changes

3

When data is added, modified, or deleted, the chart automatically recalculates and refreshes

4

No manual intervention is required to see updated visualizations

circle-check

Auto-Update When Empty: Enable Should auto update when empty to automatically populate the chart even when first added to a section without initial data. This is useful for template sections that will collect data over time.

Chart Type Flexibility

While the default visualization is a bar chart, the underlying data structure supports multiple chart type interpretations:

  • Bar Charts: Best for comparing discrete categories

  • Grouped Bar Charts: When using the Group option for multi-dimensional comparison

  • Stacked Visualizations: When working with multiple series that represent parts of a whole

The widget automatically selects the most appropriate visualization based on your configuration.

Best Practices

Data Organization

  • Categorical Clarity: Use Select or ForeignKey columns with clear, descriptive category names for optimal x-axis labeling

  • Consistent Categorization: Ensure categorical data is standardized across records to avoid fragmented visualizations

  • Limited Categories: Aim for 5-15 categories on the x-axis for readability. Use Query filters to narrow scope if you have too many categories

  • Meaningful Grouping: When using the Group option, choose grouping columns that provide analytical value and don't create excessive complexity

Performance Optimization

  • Query Filtering: Apply Query filters to limit records and improve chart rendering speed, especially for large datasets

  • Strategic Auto-Update: Use auto-update selectively for sections where real-time data is critical, as it consumes additional resources

  • Height Optimization: Set appropriate chart heights based on the number of categories to ensure readability without excessive scrolling

  • Aggregation Selection: Choose the most appropriate aggregation method for your data type to ensure meaningful results

Analytical Strategy

  • Start Simple: Begin with record counts before adding numeric series and complex aggregations

  • Progressive Enhancement: Add grouping and multiple series incrementally to understand data relationships

  • Appropriate Aggregation: Match aggregation methods to your analysis goals (sum for totals, average for typical values, max/min for ranges)

  • Sorting Strategy: Use meaningful x-axis sorting (alphabetical for names, RID for chronological)

circle-check

Common Pitfalls to Avoid

  • Avoid: Selecting text or rich text columns for the x-axis, which can create cluttered or meaningless categories

  • Instead: Use dedicated Select or ForeignKey columns designed for categorical data

  • Avoid: Using "Name only" x-axis format without understanding it groups different records with the same name

  • Instead: Use "Full (UID: Name)" format when you need to see distinct records, use "Name only" only for intentional grouping

  • Avoid: Displaying too many categories (20+) on a single chart

  • Instead: Apply Query filters to focus on relevant subsets or create multiple charts for different category groups

Visualization Best Practices

  • Clear Titles: Provide descriptive chart titles that explain what data is being visualized and the aggregation method

  • Appropriate Height: Adjust chart height based on the number of categories – more categories need more vertical space

  • Logical Sorting: Sort categories in a way that enhances understanding (alphabetical for comparison, RID for chronological trends)

  • Color Coding: When using groups or multiple series, ensure the resulting color coding is distinguishable

Complementary Widgets

  • Chart By Numeric X: Use together when you need both categorical and numeric x-axis visualizations. Chart By Category X handles discrete groups while Chart By Numeric X displays continuous numeric relationships

  • Data Visualizer: Combine with Data Visualizer when you need to supplement table-driven charts with manually entered summary data

  • Record Summary: Works well alongside Record Summary widgets to provide both high-level record pattern analysis and detailed categorical breakdowns

Integration Scenarios

  • Combine Chart By Category X + Filter widgets + Table views for comprehensive data exploration with both visual and tabular perspectives

  • Use Chart By Category X with Select columns + Number columns to create treatment response visualizations in experimental protocols

  • Integrate Chart By Category X + Auto-update + Real-time data entry for live quality control dashboards in production environments

  • Pair Chart By Category X + ForeignKey columns + Cross-table relationships for analyzing distributed data across related tables

Last updated