Only string can be accepted by Chart Tool----array/list/numbers can not be accepted #4551

Closed
opened 2026-02-21 18:06:59 -05:00 by yindo · 1 comment
Owner

Originally created by @hsauod on GitHub (Jul 11, 2024).

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).
  • 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.11

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Only string can be accepted by Chart Tool----array/list/numbers can not be accepted
Screenshot 2024-07-11 at 12 12 12

✔️ Expected Behavior

array/list/numbers can be accepted

Actual Behavior

Only string can be accepted by Chart Tool----array/list/numbers can not be accepted

Originally created by @hsauod on GitHub (Jul 11, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.11 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Only string can be accepted by Chart Tool----array/list/numbers can not be accepted <img width="476" alt="Screenshot 2024-07-11 at 12 12 12" src="https://github.com/langgenius/dify/assets/62248243/b4e0df25-5ebb-40c3-9db5-f71cc59dfe84"> ### ✔️ Expected Behavior array/list/numbers can be accepted ### ❌ Actual Behavior Only string can be accepted by Chart Tool----array/list/numbers can not be accepted
yindo added the 🐞 bug label 2026-02-21 18:06:59 -05:00
yindo closed this issue 2026-02-21 18:06:59 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 11, 2024):

Hello @hsauod! I'm here to help you with any bugs, questions, or contributions you might have for the project. Let me know how I can assist you!

The Chart Tool in Dify version 0.6.11 only accepts strings for the "data" and "Categories" fields. The expected format for these fields is a semicolon-separated string of numbers for "data" and a semicolon-separated string of texts for "Categories" [1][2].

However, there have been updates in version 0.6.13 that address data type handling. Specifically, the code now includes a check to convert all data to integers if they are all digits, otherwise, it converts them to floats [3].

If you are experiencing issues with arrays, lists, or numbers not being accepted, ensure that you are using the correct string format as described. If the problem persists, consider updating to version 0.6.13, which includes improvements in data type handling.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jul 11, 2024): <!-- Greeting --> Hello @hsauod! I'm here to help you with any bugs, questions, or contributions you might have for the project. Let me know how I can assist you! <!-- Answer --> The Chart Tool in Dify version 0.6.11 only accepts strings for the "data" and "Categories" fields. The expected format for these fields is a semicolon-separated string of numbers for "data" and a semicolon-separated string of texts for "Categories" <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin/chart/tools/pie.py)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin/chart/tools/pie.yaml)</sup>. However, there have been updates in version 0.6.13 that address data type handling. Specifically, the code now includes a check to convert all data to integers if they are all digits, otherwise, it converts them to floats <sup>[[3]](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin/chart/tools/line.py)</sup>. If you are experiencing issues with arrays, lists, or numbers not being accepted, ensure that you are using the correct string format as described. If the problem persists, consider updating to version 0.6.13, which includes improvements in data type handling. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4551