-
Notifications
You must be signed in to change notification settings - Fork 31
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
Bars are not being displayed with parsing option #100
Comments
Hello @thiagonzalez :) Thank you for reporting the issue. As you've correctly pointed out, the plugin currently does not support the parsing option. Thank you for your understanding, and I appreciate your patience while I work on resolving this issue. |
I have addressed the issue, and I'm pleased to announce that chartjs-plugin-stacked100 version 1.5 now supports the parsing option. |
hey @y-takey, What I could notice is that Webpack is generating some code that is breaking it. To just have my feature here done, I copied the whole content of your plugin and everything worked great. Maybe it's a good thing to migrate from Webpack to Rollup, just like others plugins do. Again, you rock! thank you so much |
Thank you for trying it out so quickly, and I'm glad to hear that the issue is resolved. :) Regarding the matter with #87, I appreciate your suggestion to migrate to Rollup. |
hey @y-takey, I know you already closed this issue, but I came up with a different issue, but very related to this one. I have the following config to initialize a chartJS instance:
As you can see above, not all users have entries on all datasets. You can see a regular bar chart below, removing the But once I use the plugin, this is the result I'm getting: You can notice that User 3's "done" and "in progress" were displayed in User 1's column because User 1 and User 2 don't have these 2 pieces of data. I could be doing something wrong here on my side, but I would like to hear from you as well. Thank you :) |
Hey @thiagonzalez , |
I have fixed the reported issue and released version 1.5.3 of the plugin! |
hey @y-takey , I already told you are the man, right? Thank you so much! On the other hand, I had a new issue. I have a very simple function to customize tooltips and some items from my chart are returning The strangest part is that only a few items get You will be able to simulate this using the link below: I left a PS: I'm using Thank you so much |
hey @thiagonzalez , Thank you for checking it out promptly and letting me know it worked well for you. Regarding the tooltip issue, it seems that the provided CodeSandbox link is broken. (Upon opening the URL, it showed "Sandbox not found.") tooltip: {
callbacks: {
label: (tooltipItem) => {
const data = tooltipItem.chart.data;
const datasetIndex = tooltipItem.datasetIndex;
const index = tooltipItem.dataIndex;
const datasetLabel = data.datasets[datasetIndex].label || "";
const rateValue = data.calculatedData[datasetIndex][index];
// **Here's the key point**
const originalData = tooltipItem.dataset.data.find(rec => rec.assignee === tooltipItem.label);
return `${datasetLabel}: ${rateValue}% (raw ${originalData.count})`;
},
},
} However, using the tooltips option can make things more complex and inconvenient. I'll consider if there's a simpler way to access it in the future. |
Hey @y-takey, Sorry about the sandbox. For some reason, it became private. Please, try again here: I was making a few tests here in the last few days and something I realized is that now the information on the chart in terms of columns and % for each block is working perfectly, but when I try to use data from the objects inside If you look at my example on the link, you will see this:
The status looks ok, but the assignee is getting lost. Try to hover the bars and see the tooltips. Let me know if the link is working for you now. |
Hey @thiagonzalez , # script.js Line 354
const raw = fallbackData || tooltipItem.raw; Actually, this plugin replaces the data with computed values (of type number[][]). The replaced data looks something like this.
Therefore, the data passed to the tooltip is offset because it retrieves the original data based on the index of the replaced data.
|
Hello everyone,
I have been working on a 100% stacked bar chart and once I initialized the
chartjs-plugin-stacked100
on the plugins object, the bars stopped displaying.Without the
chartjs-plugin-stacked100
:With the
chartjs-plugin-stacked100
:It is worth pointing out that I'm using
chartjs
4.2.1 andchartjs-plugin-stacked100
1.3.0.The dataset structure is:
You can find the setup running on the link below:
https://codesandbox.io/s/happy-fermat-lyxmmj?file=/src/script.js
Please, let me know if you have any clue of what is going on.
Thank you!
The text was updated successfully, but these errors were encountered: