Clear dataset of Bar chart
Function: Clear dataset of Bar chart
This action allows you to remove all the data points from a specific dataset within a Bar Chart on your application. This is useful when you want to reset a chart, remove old data, or prepare it for new data without deleting the chart itself.
Input,
- UI element (Type: PART, Subtype: bar-chart): This is the specific Bar Chart component on your application that you want to modify. You must select a Bar Chart UI element.
- Code (Type: STRING): This is the unique identifier (code) of the specific dataset within the chosen Bar Chart that you wish to clear.
Output,
This action does not produce any direct output. Its effect is to clear the data points from the specified dataset within the Bar Chart.
Execution Flow,
Real-Life Examples,
-
Clearing Monthly Sales Data
- Scenario: You have a dashboard with a "Monthly Sales" bar chart, and at the end of each month, you want to clear the previous month's sales data to prepare for new entries.
- Inputs:
- UI element:
Monthly Sales Chart(the specific bar chart component) - Code:
SalesData(the identifier for the dataset holding sales figures)
- UI element:
- Result: The "Monthly Sales Chart" will instantly show an empty "SalesData" dataset, ready for new sales figures to be added.
-
Resetting User Progress Chart
- Scenario: In an educational application, a user completes a course, and you want to reset their "Course Progress" bar chart to zero for a new course enrollment.
- Inputs:
- UI element:
UserProgressChart(the bar chart displaying the user's progress) - Code:
CourseCompletion(the identifier for the dataset tracking completion percentage)
- UI element:
- Result: The "UserProgressChart" will have its "CourseCompletion" dataset cleared, visually resetting the user's progress for that specific course.
-
Removing Temporary Survey Responses
- Scenario: You are conducting a live poll using a bar chart to show real-time responses. After the poll ends, you want to clear the results from the chart without removing the chart itself, so it can be reused for the next poll.
- Inputs:
- UI element:
LivePollResultsChart(the bar chart displaying poll responses) - Code:
PollResponses(the identifier for the dataset containing the response counts)
- UI element:
- Result: The "LivePollResultsChart" will no longer display any "PollResponses" data, effectively clearing the previous poll's results and making the chart ready for a new poll.