-
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
Radar chart: allow missing data #5073
Comments
@flaurida supporting this should be relatively easy. We already have a I think all that needs to happen is to set spanGaps in here in a similar way to https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.line.js#L71 Then you'd insert const chart = new Chart(ctx, {
type: 'radar',
data: {
datasets: [{
label: 'dataset',
data: [10, 20, NaN, 15, 25],
borderColor: 'red',
fill: false,
spanGaps: true
}],
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding"]
},
options: {
}
}) |
Hi @etimberg thanks for the prompt response! I just tried setting |
If it is helpful, here is a jsfiddle of your suggestion to see the issue more clearly: |
Thanks for the fiddle! This still requires a small code change in |
Oh awesome, just tried it locally and it works! How can we get this fixed for chart.js? |
Just submitted a PR, hopefully we can merge the fix soon? Thanks again! |
Hi Chart.js,
I am trying to build a radar chart with a consistent set of point labels, but that handles the case where not all of the labels have data. Is there a way to only draw points for the labels that have data, and then connect just those points, while still showing the same set of labels consistently? Let me know!
Thanks,
Laura
The text was updated successfully, but these errors were encountered: