我在图表js中遇到闪烁问题和缩放问题,这意味着我有一个这样的条形图,其中一些级别是如此之高,意味着其中一些为20k 30k,其中一些为0.1数据,所以当我将鼠标悬停到最接近的较少数据栏会消失所有图表,并且仅向我显示该图表,但我不希望它禁用该功能。
实际图表:
发出图像的缩放或闪烁:
options: {
legend: {
display: true,
position: 'left',
labels: {
boxWidth:12
}
},
title: {
fontSize: 14,
text: output[k],
display: true
},
responsive: true,
maintainAspectRatio: false,
scales: {
yAxes: [{
ticks: {
beginAtZero:true
},
scaleLabel: {
display: true,
labelString: 'No. of People'
}
}],
xAxes: [{
scaleLabel: {
display: true,
labelString: 'Age Group'
}
}],
}
}
答案 0 :(得分:0)
将此代码添加到您的代码中以禁用缩放Y方向
[kivy]
keyboard_repeat_delay = 300
keyboard_repeat_rate = 30
log_dir = logs
log_enable = 0
log_level = debug
log_name = kivy_%y-%m-%d_%_.txt
window_icon =
keyboard_mode = systemanddock
keyboard_layout = qwertz
desktop = 1
exit_on_escape = 1
pause_on_minimize = 0
kivy_clock = default
default_font = ['Roboto', 'data/fonts/Roboto-Regular.ttf', 'data/fonts/Roboto-Italic.ttf', 'data/fonts/Roboto-Bold.ttf', 'data/fonts/Roboto-BoldItalic.ttf']
log_maxfiles = 100
window_shape = data/images/defaultshape.png
config_version = 20
[graphics]
display = -1
fullscreen = auto
height = 1500
left = 0
maxfps = 60
multisamples = 2
position = auto
rotation = 0
show_cursor = 0
top = 0
width = 2000
resizable = 1
borderless = 0
window_state = visible
minimum_width = 0
minimum_height = 0
min_state_time = .035
allow_screensaver = 1
shaped = 0
[input]
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput
[postproc]
double_tap_distance = 20
double_tap_time = 250
ignore = []
jitter_distance = 0
jitter_ignore_devices = mouse,mactouch,
retain_distance = 50
retain_time = 0
triple_tap_distance = 20
triple_tap_time = 375
[widgets]
scroll_timeout = 250
scroll_distance = 20
scroll_friction = 1.
scroll_stoptime = 300
scroll_moves = 5
[modules]
例如:
Please save your file with .php extension. You can assign php value into js variable and pass it to PayPal. I have attached sample code below: I am passing amount value from php variable.`<script>
var total_price= '<?php echo $total_price; ?>';
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: total_price
}
}]
});//insert JSON above this line
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name);
// Call your server to save the transaction
return fetch('/BurgerJoint/GetOrder.php', {
method: 'post',
headers: {
'content-type': 'application/json'
},
body: JSON.stringify({
orderID: data.orderID
})
});
});
}
}).render('#paypal-button-container');
</script>`
下次请提供您的代码