-
Notifications
You must be signed in to change notification settings - Fork 169
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
Native XmR Charts #1950
Comments
Would it be helpful to add code snippets of how I am using the |
@matsonj for sure |
Alright, consider a dataset with two columns, x & value, called “my_data”, and ordered by x. We first need to calculate some metrics on it. Average from ${my_data}
select avg(value) as avg_num1 Moving Range from ${my_data}
select x, value, lag(value, 1) over (order by x) as lag_value, abs(value - lag(value, 1) over (order by x)) as diff Avg Moving Range from ${moving_range}
select avg(diff) as avg_diff,
stddev(diff) as std_dev_diff Next set some values for in js for use in the charts
Finally we can build the chart.
Obviously, some of the aesthetic choices here are mine and I don’t really care on durability of them (i.e. marker size, chart height). There are a few bits not yet implemented here as well.
|
I think ideally, this could all be simplified into something like this:
The annoying part is honestly doing all the math in sql/js, so bundling the calculations in the component is the key unlock. Additionally, supporting divider lines means that the |
i feel like @ItsMeBrianD now has a pattern for executing SQL inside components? |
Feature Description
Add support for XmR charts
Goal of Feature
One line invocation of the XmR chart type
Current Solution / Workarounds
@matsonj has an implementation as a custom component
Alternatives
Be unable to tell the difference between routine and exceptional variation in a time series.
The text was updated successfully, but these errors were encountered: