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

真机和浏览器呈现的效果不一样的问题 #199

Closed
huangche007 opened this issue Sep 15, 2017 · 5 comments
Closed

真机和浏览器呈现的效果不一样的问题 #199

huangche007 opened this issue Sep 15, 2017 · 5 comments

Comments

@huangche007
Copy link

我在手机上看得效果是这样的

在PC浏览器看到的效果:

代码如下:
mData: { labels: ["2017-09-10", "2017-09-11", "2017-09-12", "2017-09-13", "2017-09-14", "2017-09-15"], datasets: [{ label: '稀土日均价', data: [12, 19, 3, 5, 2, 3], backgroundColor: [ 'rgba(255, 99, 132, 0.2)', 'rgba(54, 162, 235, 0.2)', 'rgba(255, 206, 86, 0.2)', 'rgba(75, 192, 192, 0.2)', 'rgba(153, 102, 255, 0.2)', 'rgba(255, 159, 64, 0.2)' ], borderColor: [ 'rgba(255,99,132,1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)', 'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)' ], borderWidth: 1 }] }, options: { scales: { yAxes: [{ ticks: { beginAtZero:true } }] } } <line-example :data="mData" :options="options" :width="400" :height="200" > </line-example>
为什么会这样,感觉好奇怪

@apertureless
Copy link
Owner

Okay... that seems like a bug in Chart.js
Can you check if this appear with hex colors like #FFE0E6

Because it looks like iOS Safari does not like the rgba()

@huangche007
Copy link
Author

Yeah,When I use like #FFE0E6 ,it works well。

@apertureless
Copy link
Owner

apertureless commented Sep 15, 2017

Okay, then you should report this bug in the Chart.js repo. As it seems to be a bug in the chartjs core.

A quick fix, would be to use hex values instead of rgba()

@huangche007
Copy link
Author

Ok I will do this when i finish my work

@apertureless
Copy link
Owner

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants