简体   繁体   中英

Google Charts line thickness(& Sharpness) differ

I just found that there are some difference in the line thickness (and sharpness) even tough their line thickness property has be set to the same. I have searched all over the Google Charts webpage. But I could find nothing. How to solve this kind of error ?

在此输入图像描述

Check all the lines you find the difference. Some will blur and other will be sharp.

This isn't really specific to Google charts, its an artefact of Anti aliasing . In brief, the pixels in most computer displays are relatively large, which makes precise display difficult. Anti aliasing uses shading to make an image look like it was rendered with more pixels than are actually available, at the cost of being blurry. When you have some lines that match the real pixels, you will see the difference.

There doesn't seem to be an option to turn off antialiasing that I can see in the Google Charts documentation.

If you are exporting images (eg PNGs) you could export at a larger size and reduce the image back at a non-integral scale: that way all lines will be blurred roughly equally as no source pixel will exactly line up with a destination pixel.

If you are trying to display SVGs, you might be able to turn off antialiasing using CSS styles. (Maybe try this )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM