You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two related issues with the Slider component in Evidence.dev when used for adjusting histogram bucket sizes:
Slider DefaultValue Issue:
When setting the defaultValue property on the slider, the displayed value does not update even though the slider marker moves.
When the defaultValue property is removed, the slider works as expected, and changes correctly affect the data.
Production Build (npm run build && npm run preview) Issues:
When the slider is set to 1, the histogram data only returns one row instead of 100, even though the expected output should be 100 rows.
When selecting any other slider value (2-25), the data is displayed correctly.
The x-axis min/max values (0-100) are not respected, and all bars are squeezed into a small section, making the chart unreadable. This does not happen in the dev server (npm exec evidence dev), where the histogram renders correctly.
Image 1: Dev Mode - Slider @ 1
Image 2: Dev Mode - Slider @ 5
Image 3: Prod Mode - Slider @ 1
Image 4: Prod Mode - Slider @ 5
Steps to Reproduce
Steps to Reproduce
1. Slider DefaultValue Issue
Set the defaultValue prop on the Slider component:
with bucket_ranges as (
select
(${inputs.step} * floor(cast(round_score as float) / ${inputs.step})) + (${inputs.step} /2.0) as score_bucket,
${inputs.step} * floor(cast(round_score as float) / ${inputs.step}) as range_start,
${inputs.step} * floor(cast(round_score as float) / ${inputs.step}) + ${inputs.step} as range_end,
sum(cast(interval_count asinteger)) as count,
sum(cast(interval_count as float)) *100.0/ nullif(sum(sum(cast(interval_count as float))) over (), 0) as percentage
fromch_prod.severity_data_densitywhere question ='${inputs.Question.value}'and side ='${inputs.Side.value}'group by score_bucket, range_start, range_end
)
select
score_bucket,
range_start ||'-'|| range_end as score_range,
count,
round(percentage, 1) as percentage
from bucket_ranges
order by score_bucket;
Logs
_No specific logs observed, but issue is consistent across different `.md` pages._
This issue may have been introduced by the latest version that I have upgraded to. Since I did not have this issue before.
Describe the bug
There are two related issues with the
Slider
component in Evidence.dev when used for adjusting histogram bucket sizes:Slider DefaultValue Issue:
defaultValue
property on the slider, the displayed value does not update even though the slider marker moves.defaultValue
property is removed, the slider works as expected, and changes correctly affect the data.Production Build (
npm run build && npm run preview
) Issues:1
, the histogram data only returns one row instead of 100, even though the expected output should be 100 rows.2-25
), the data is displayed correctly.npm exec evidence dev
), where the histogram renders correctly.Image 1: Dev Mode - Slider @ 1
Image 2: Dev Mode - Slider @ 5
Image 3: Prod Mode - Slider @ 1
Image 4: Prod Mode - Slider @ 5
Steps to Reproduce
Steps to Reproduce
1. Slider DefaultValue Issue
defaultValue
prop on theSlider
component:defaultValue
and test again → The slider updates correctly.2. Production Build Issues
npm exec evidence dev
npm run build && npm run preview
1
→ Only one row appears instead of 100.2-25
) → The data displays correctly.min=0, max=100
) are ignored, squeezing the bars into a narrow section.Reproduction
Relevant Code from
severity_data.md
DuckDB Query for Histogram Data in MD file
Logs
_No specific logs observed, but issue is consistent across different `.md` pages._ This issue may have been introduced by the latest version that I have upgraded to. Since I did not have this issue before.
System Info
Severity
serious, but I can work around it
Additional Information, or Workarounds
defaultValue
from theSlider
resolves part of the issue in dev mode.step = 1
results in only one row instead of 100.Formatted and grammar corrected with the help of ChatGPT
The text was updated successfully, but these errors were encountered: