Ask AI
Skip to main content

Clear line chart

Function: Clear line chart

This function allows you to instantly remove all data displayed on a specific Line Chart in your application. It's useful when you want to reset a chart, prepare it for new data, or simply hide its current content.

Input

  • UI element (PART, required): This is the specific Line Chart component on your page that you want to clear. You will need to select the Line Chart from a list of available UI elements in your application.

Output

This function does not produce a direct output value. Instead, its effect is visible directly on your application's page: the selected Line Chart will become empty, with all its data points and series removed.

Execution Flow

Real-Life Examples

Example 1: Resetting a Sales Performance Chart

  • Scenario: You have a dashboard showing sales performance over time in a line chart. After a user applies various filters, they want to see the chart completely empty before selecting new filter options.
  • Inputs:
    • UI element: Sales Performance Line Chart
  • Result: The "Sales Performance Line Chart" on the dashboard immediately clears, showing no data points or lines, ready for new data to be loaded.

Example 2: Clearing a Chart on Page Navigation

  • Scenario: Your application has multiple tabs, each with different data visualizations. When a user navigates away from a tab containing a line chart, you want to clear that chart to ensure it's fresh when they return, or to free up resources.
  • Inputs:
    • UI element: Monthly Revenue Trend Chart
  • Result: As the user leaves the tab, the "Monthly Revenue Trend Chart" is emptied, so when they revisit the tab, it will be blank until new data is explicitly loaded.

Example 3: Preparing a Chart for Data Import

  • Scenario: You have a feature where users can import data from a spreadsheet, which then populates a line chart. Before the import process begins, you want to ensure the chart is completely empty to avoid mixing old and new data.
  • Inputs:
    • UI element: Imported Data Visualization Chart
  • Result: The "Imported Data Visualization Chart" is cleared of any existing data, providing a clean slate for the incoming imported data.