vega / vega-lite

A concise grammar of interactive graphics, built on Vega.
https://vega.github.io/vega-lite/
BSD 3-Clause "New" or "Revised" License
4.68k stars 611 forks source link

Rule mark issue with very large chart #8785

Open apbreports opened 1 year ago

apbreports commented 1 year ago

Hello,

I have noticed that the rule mark gradually turns thicker and a more gray color as the chart grows horizontally in size. In my screen shot you see the rule mark changing color and thickness. I have tested with color, size and strokeWidth etc but for large charts the rule mark becomes washed out and bigger than usual.

What is the cause of this and what is the fix?

Thanks for all the great work.

Rule mark issue

domoritz commented 1 year ago

Is this a Vega issue instead of Vega-Lite?

apbreports commented 1 year ago

Hi Dominik,

I use vega-lite. The issue could be Vega related though.. It’s a strange one.

domoritz commented 1 year ago

Can you create a minimal repro and put a link here. Then I can move it to Vega if it's a Vega issue.

apbreports commented 1 year ago

I have now uploaded a demo page for you to see. Now with this demo the lines are thicker sometimes and if you zoom in you can see the rule mark has a gray background on just some of the charts. It seems to be a random issue. The 5 charts have exactly the same spec. I just limited the data in each chart.

Here is the demo I have setup: https://apbreports.com/dashboards/vega_lite_2023-03-15/html/rule_bug.html

rule_differences

apbreports commented 1 year ago

I have now set the size of the rule to 0.5 and now it it is randomly turning gray color. Charts 1 and 3 look as expected but the others have turned gray color. I suspect you have a background color on the line and it is not getting filled/aligned correctly.

Demo 2: https://apbreports.com/dashboards/vega_lite_2023-03-15/html/rule_bug2.html

apbreports commented 1 year ago

Related? https://github.com/vega/vega-lite/issues/3429