-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Bubble Chart with single dataset can have different background color for different data type OR Can Multiple Dataset in bubble chart show single point data on tooltip hover #2785
Comments
Could you please drop this in a fiddle? |
@etimberg -> The Fiddle is provided in below URL. Please add chartjs and jquery script file as i am unaware how to add external script file in fiddle. |
Updated fiddle with external dependencies: https://jsfiddle.net/x2doa0bo/2/ |
@etimberg -> Thanks for updating external reference. I was trying to analyse the issue and found one point where i think, fixes needs to be made. Line 11571 : update: function(changed) { if (this._options.tooltips.mode === 'single') {
Also, after updating the fiddle and pointing to new cdn chartjs reference, the tooltip works only for first time. After that we get "Object ref Exception" for "_xScale" property. Can you please update external reference again? Let me know if you need any further assistance and i will be glad to walk through it. Regards, |
I guess hover and tooltip are not to be set together. This was causing the issue. Thanks @etimberg for helping in the fiddle. |
I believe the issues seen with the hovering and tooltips having multiple items were fixed in #3400 with the new modes |
var datacb4 = {
datasets: [
{
label: 'Close', backgroundColor: 'rgba(0, 255, 0, 1)', data: [{ x: '8', y: '7', r: '2' }, { x: '71', y: '59', r: '2' }]
},
{
label: 'Archive', backgroundColor: 'rgba(102, 0, 0, 1)', data: [{ x: '7', y: '7', r: '4' }]
},
{
label: 'Delete', backgroundColor: 'rgba(0, 0, 255, 1)', data: [{ x: '0', y: '6', r: '6' }, { x: '6', y: '6', r: '6' }, { x: '7', y: '7', r: '6' }]
},
]
};
var cbctx = $('#canvasts0');
var myCBChart = new Chart(cbctx,
{
type: 'bubble',
data: datacb4,
options:
{
title: { text: 'SSA [ 6 ] ', display: 'true' },
tooltips: { mode: 'label' },
hover: { mode: 'label' },
legend: { display: 'true' },
scaleBeginAtZero: 'true',
responsive: 'true',
scales: {
xAxes: [{ position: 'bottom', gridLines: { zeroLineColor: 'rgba(0,0,0,1)' }, scaleLabel: { display: 'true', labelString: 'size KB' } }],
yAxes: [{ position: 'left', gridLines: { zeroLineColor: 'rgba(0,0,0,1)' }, scaleLabel: { display: 'true', labelString: 'duration sec' } }]
}
}
});</script>
The text was updated successfully, but these errors were encountered: