Skip to content

bar_chart tool incorrectly ignores duplicate x-axis labels #10132

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

Closed
5 tasks done
llinvokerl opened this issue Oct 31, 2024 · 1 comment · Fixed by #10134
Closed
5 tasks done

bar_chart tool incorrectly ignores duplicate x-axis labels #10132

llinvokerl opened this issue Oct 31, 2024 · 1 comment · Fixed by #10134
Labels
🐞 bug Something isn't working

Comments

@llinvokerl
Copy link
Contributor

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.2

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

When creating bar charts using the built-in tool, duplicate labels on the x-axis are automatically filtered out, leading to potential misrepresentation of the data on the chart.

Inputs: {'data': '150;100;200;250', 'x_axis': 'a;b;a;b'}

✔️ Expected Behavior

e693411e-3604-4987-8eed-c18b16652f36

❌ Actual Behavior

4fc8b4f1-49e2-4b3a-9e2f-95f32065982f

@dosubot dosubot bot added the 🐞 bug Something isn't working label Oct 31, 2024
Copy link

dosubot bot commented Oct 31, 2024

@llinvokerl Hello! I'm here to help you with your bug report. I can assist you in solving bugs, answering questions, and becoming a contributor while you wait for a human maintainer.

The bar_chart tool does not explicitly handle duplicate x-axis labels in the code. The matplotlib library, which is used for rendering charts, will display x-axis labels as provided, including duplicates. If duplicates are being filtered out, it might be due to some other part of the code or a misunderstanding of how the data is being processed. The current implementation does not include logic to filter out or ignore duplicate x-axis labels [1].

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant