UNPKG

@visactor/vmind

Version:

<div align="center"> <a href="https://github.com/VisActor#gh-light-mode-only" target="_blank"> <img alt="VisActor Logo" width="200" src="https://github.com/VisActor/.github/blob/main/profile/logo_500_200_light.svg"/> </a> <a href="https://githu

27 lines (15 loc) 5.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.barChartExample1 = exports.dynamicBarChart1 = exports.pieChartExample1 = exports.lineChartExample2 = exports.lineChartExample1 = void 0; const lineChartExample1 = showThoughts => `User Input: 帮我展示降雨量变化趋势.\nData field description: [\n{\n"id": "日期",\n"description": "Represents the current month, which is a date.",\n"type": "string",\n"role": "dimension"\n},\n{\n"id": "降雨量",\n"description": "Represents the rainfall in the current month, which is a number.",\n"type": "int",\n"role": "measure"\n}\n]\n\nResponse:\n\`\`\`\n{${showThoughts ? '\n"thoughts": "Your thoughts",' : ""}\n"CHART_TYPE": "Line Chart",\n"FIELD_MAP": {\n"x": "日期",\n"y": "降雨量"\n}${showThoughts ? ",\n\"REASON\": \"User wants to show the trend of the rainfall, which is suitable for displaying with a line chart. The '日期' is used as the x-axis because it's a date, and the 降雨量 is used as the y-axis because it's a number. This chart can show the trend of rainfall.\"" : ""}\n}\n\`\`\``; exports.lineChartExample1 = lineChartExample1; const lineChartExample2 = showThoughts => `User Input: 帮我绘制图表, 时长20s.\nData field description: [\n{\n"id": "日期",\n"description": "Represents the current month, which is a date.",\n"type": "date",\n"role": "dimension"\n},\n{\n"id": "降雨量",\n"description": "Represents the rainfall in the current month, which is a number.",\n"type": "int",\n"role": "measure"\n}\n]\n\nResponse:\n\`\`\`\n{${showThoughts ? '\n"thoughts": "Your thoughts",' : ""}"CHART_TYPE": "Line Chart",\n"FIELD_MAP": {\n"x": "日期",\n"y": "降雨量"\n}${showThoughts ? ",\n\"REASON\": \"User did not show their intention about the data in their input. The data has two fields and it contains a date field, so Line Chart is best suitable to show the data. The field '日期' is used as the x-axis because it's a date, and the 降雨量 is used as the y-axis because it's a number. The duration is 20s but we just ignore it.\"" : ""}\n}\n\`\`\``; exports.lineChartExample2 = lineChartExample2; const pieChartExample1 = showThoughts => `User Input: 帮我展示各手机品牌的市场占有率, 赛博朋克风格, 时长5s\nData field description: [\n{\n"id": "品牌名称",\n"description": "Represents the name of the mobile phone brand, which is a string.",\n"type": "string",\n"role": "dimension"\n},\n{\n"id": "市场份额",\n"description": "Represents the market share of the brand, which is a percentage.",\n"type": "float",\n"role": "measure"\n}\n]\n\nResponse:\n\`\`\`\n{${showThoughts ? '\n"thoughts": "Your thoughts",' : ""}\n"CHART_TYPE": "Pie Chart",\n"FIELD_MAP": {\n"angle": "市场份额",\n"color": "品牌名称"\n}${showThoughts ? ',\n"REASON": "The data contains the market share, and the user wants to show percentage data, which is suitable for displaying with a pie chart. The 市场份额 is used as the angle of the pie chart to show the market share of each brand. The 品牌名称 is used as the color to distinguish different brands. The duration is 5s but we just ignore it."' : ""}\n}\n\`\`\``; exports.pieChartExample1 = pieChartExample1; const dynamicBarChart1 = showThoughts => `User Input: 帮我展示历届奥运会各国金牌数量的对比.\nData field description: [\n{\n"id": "country",\n"description": "Represents the name of the country, which is a string.",\n"type": "string",\n"role": "dimension"\n},\n{\n"id": "金牌数量",\n"description": "Represents the number of gold medals won by the country in the current year, which is an integer.",\n"type": "int",\n"role": "measure"\n},\n{\n"id": "year",\n"description": "Represents the current year, which is a date.",\n"type": "string",\n"role": "dimension"\n}\n]\n\nResponse:\n\`\`\`\n{${showThoughts ? '\n"thoughts": "Your thoughts",' : ""}\n"CHART_TYPE": "Dynamic Bar Chart",\n"FIELD_MAP": {\n"x": "country",\n"y": "金牌数量",\n"time": "year"\n}${showThoughts ? ",\n\"REASON\": \"The data contains the year, country, and medal count, and the user's intention contains 'comparison', which is suitable for drawing a dynamic bar chart that changes over time to show the comparison of gold medal counts of various countries in each Olympic Games.The 'country' field is used as the x-axis of the bar chart, and '金牌数量' is used as the y-axis to show the comparison of gold medal counts of various countries in the current year.The 'year' field is used as the time field of the dynamic bar chart to show the comparison of gold medal counts of various countries at different years.\"" : ""}\n}\n\`\`\``; exports.dynamicBarChart1 = dynamicBarChart1; const barChartExample1 = showThoughts => `User Input: 帮我展示不同区域各商品销售额。\nData field description: [\n{\n"id":"商品名称",\n"type":"string",\n"role":"dimension"\n},\n{\n"id":"region",\n"type":"string",\n"role":"dimension"\n},\n{\n"id":"销售额",\n"type":"int",\n"role":"measure"\n}\n]\n\nResponse:\n\`\`\`\n{${showThoughts ? '\n"thoughts": "Your thoughts",' : ""}\n"CHART_TYPE": "Bar Chart",\n"FIELD_MAP": {\n"x": "商品名称",\n"y": "销售额"\n}${showThoughts ? ",\n\"REASON\": \"User wants to show the sales of different products in different regions, which is suitable for displaying with a bar chart. The '商品名称' is used as the x-axis because it's a string field, and the '销售额' is used as the y - axis because it's a number field. The 'region' field can be used to distinguish different regions, but since the user did not specify the color channel, we will not use it.\"" : ""}\n}\n\`\`\``; exports.barChartExample1 = barChartExample1; //# sourceMappingURL=examples.js.map