Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stepline chart - choose preferred line interpolation #4313

Closed
Labels
feature-request New feature or request

Comments

@tinakuzmenko
Copy link

tinakuzmenko commented Mar 8, 2024

Summary

Introduce an enhanced feature for the "stepline" line chart to allow choosing preferred line interpolation style. Currently, the stepline chart defaults to stepping after each data point. This proposal suggests adding an option to enable stepping before the data point, accommodating a wider range of use cases and improving data visualization accuracy.

API Changes

Example of this behaviour is currently present in Grafana:

Screenshot 2024-03-08 at 17 41 29 Screenshot 2024-03-08 at 17 53 25

Intended Use Case

Step after:

  • Manufacturing and Production Monitoring: Visualize production outputs where the end-of-period values are more relevant.
  • Financial Transactions: Represent transaction completions that are recognized at the close of business hours.
  • Energy Consumption: Display energy usage patterns where readings are taken at the end of each time period.

Step before:

  • Inventory Tracking: Monitor stock levels to visualize the inventory status right before new additions or subtractions, crucial for understanding stock movement and planning replenishments.
  • Event-Driven Data Analysis: Record occurrences of specific events, such as system alerts or error logs, showing the system's state leading up to an event to clarify periods of stability versus times of increased activity.
  • Energy Production Monitoring: Track energy production (e.g., solar, wind) over time, illustrating the amount of energy produced before any changes in capacity or consumption, useful for production stability analysis and capacity planning.
  • Budget and Expense Tracking: Monitor budget allocation or expenses over time, visualizing the budget spent or remaining before each new expense, offering insights into financial management and planning.
@tinakuzmenko tinakuzmenko added the feature-request New feature or request label Mar 8, 2024
rosco54 added a commit to rosco54/apexcharts.js that referenced this issue Mar 12, 2024
Provide a "step after" version of the current "step before" line chart.

API:
Retain the existing "stepline" (Step before) curve type for backward
compatibility and denote the new type as "linestep" (Step after).

Read these as "step followed by line" and "line followed by step"
respectively.

Example:

stroke: {
	curve: 'linestep'
}

Add e2e sample: source/line/linestep.xml and derived (built) samples.
rosco54 added a commit to rosco54/apexcharts.js that referenced this issue Mar 12, 2024
Provide a "step before" version of the current "step after" line chart.

API:
Retain the existing "stepline" curve type for backward compatibility
and denote the new type as "linestep".

Example:

stroke: {
	curve: 'linestep'
}

Add e2e sample: source/line/linestep.xml and derived (built) samples.
rosco54 added a commit to rosco54/apexcharts.js that referenced this issue Mar 12, 2024
Provide a "step before" version of the current "step after" line chart.

API:
Retain the existing "stepline" curve type for backward compatibility
and denote the new type as "linestep".

Example:

stroke: {
	curve: 'linestep'
}

Add e2e sample: source/line/linestep.xml and derived (built) samples.
junedchhipa added a commit that referenced this issue Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment