haseeb-heaven / coderunner-chatgpt

Run and save the code in Chat-GPT directly in your browser, Supports upto 70+ languages.
http://code-runner.heavenplugins.com
Other
40 stars 18 forks source link

Bar charts problem #6

Closed foruok closed 1 year ago

foruok commented 1 year ago

我通过ChatGPT使用Code Runner,生成柱状图时,第一个标签名总是带有"[",最后一个标签名总是带有"]"。 我的ChatGPT提示语为: 请创建一个柱状图,标签为['一月','二月','三月','四月'],数据集为[{label:'销售额',data:[102,218,306,389]}]

bar charts example

foruok commented 1 year ago

console information was below:

{ "chart_type": "bar", "labels": "['一月', '二月', '三月', '四月']", "datasets": [ { "label": "销售额", "data": [ 102, 218, 306, 389 ] } ] }

haseeb-heaven commented 1 year ago

Chinese: 您不必为数据集提供"["或"]",只需以简单语言提供数据集,而不是以JSON或任何数据交换格式提供。

English: You dont have to provide the "[" or "]" with the dataset just provide dataset in plain language and not in JSON or in any data exchange format.

haseeb-heaven commented 1 year ago

And this seems issue with Chatgpt sending data to plugin and nothing wrong with the plugin itself

foruok commented 1 year ago

I test it use plain language.

Chinese: 请创建一个饼图,标签为:一月,二月,三月,四月。数据为:102,80,30,260。

the problem occurred again.

I check what data the ChatGPT sent,as below:

{ "chart_type": "pie", "labels": "['一月','二月','三月','四月']", "datasets": [ { "data": [ 102, 80, 30, 260 ] } ] }

haseeb-heaven commented 1 year ago
image

I also tested with same prompt you sent me i am not getting the "[" and "]" characters at the start and end of labels.

And this uses quickchart to draw maybe they have problem with rendering labels in Chinese language

foruok commented 1 year ago

Okey,thanks a lot!