### **气泡散点图支持3种数据形式:** #### **特别注意:** * 气泡散点图:只支持多数据源配置; * 散点图的X轴和Y轴必须是数值,其他类型的暂不支持; #### **1. SQL数据** 使用SQL形式,可直接连接数据库,将SQl种的数据筛选并显示在图表上。 点击报表编辑器右侧的操作栏,点击“数据”,选择"数据类型"为“SQL数据集”,按步骤操作即可,下边讲解一下各个参数的意思: * 绑定数据集:是左侧绑定过的数据集,可选择任意一个SQL类型的数据集; * 分类属性:是X轴绑定数据库的字段; * 值属性:是Y轴绑定数据库的字段; ### **数据库配置字段如下:** ![](https://img.kancloud.cn/15/54/1554c70188e97e9dfbc5b4a91ee753e0_393x433.png) #### **2. 静态API数据** 报表绑定的数据可以是静态API的形式。 点击报表编辑器右侧的操作栏,点击“数据”,选择"数据类型"为“Api数据集”,“Api类型”选择“静态数据”,点击“数据值”,输入静态类型即可,如: ``` [ {"name":28604,"value":77,"type":"1990"}, {"name":31163,"value":77.4,"type":"1990"}, {"name":1516,"value":68,"type":"1990"}, {"name":13670,"value":74.7,"type":"1990"}, {"name":28599,"value":75,"type":"1990"}, {"name":29476,"value":77.1,"type":"1990"}, {"name":31476,"value":75.4,"type":"1990"}, {"name":28666,"value":78.1,"type":"1990"}, {"name":1777,"value":57.7,"type":"1990"}, {"name":29550,"value":79.1,"type":"1990"}, {"name":2076,"value":67.9,"type":"1990"}, {"name":12087,"value":72,"type":"1990"}, {"name":24021,"value":75.4,"type":"1990"}, {"name":43296,"value":76.8,"type":"1990"}, {"name":10088,"value":70.8,"type":"1990"}, {"name":19349,"value":69.6,"type":"1990"}, {"name":44056,"value":81.8,"type":"2015"}, {"name":43294,"value":81.7,"type":"2015"}, {"name":13334,"value":76.9,"type":"2015"}, {"name":21291,"value":78.5,"type":"2015"}, {"name":38923,"value":80.8,"type":"2015"}, {"name":37599,"value":81.9,"type":"2015"}, {"name":44053,"value":81.1,"type":"2015"}, {"name":42182,"value":82.8,"type":"2015"}, {"name":5903,"value":66.8,"type":"2015"}, {"name":36162,"value":83.5,"type":"2015"}, {"name":1390,"value":71.4,"type":"2015"}, {"name":34644,"value":80.7,"type":"2015"}, {"name":34186,"value":80.6,"type":"2015"}, {"name":64304,"value":81.6,"type":"2015"}, {"name":24787,"value":77.3,"type":"2015"} ] ``` 备注:代码格式按上边格式写,才可渲染效果; ![](https://img.kancloud.cn/b6/20/b620de2c5dd56d70492cc7318a9265cd_1308x521.png) #### **3. 动态API数据** 绑定的数据也可以是动态API的形式。 点击报表编辑器右侧的操作栏,点击“数据”,选择"数据类型"为“Api数据集”,“Api类型”选择“动态数据”,选择“绑定数据集”,点击“运行”,就可以将数据渲染过来,代码如: ``` { "data": [{ "name": 28604, "value": 77, "type": "1990" }, { "name": 31163, "value": 77.4, "type": "1990" }, { "name": 1516, "value": 68, "type": "1990" }, { "name": 13670, "value": 74.7, "type": "1990" }, { "name": 28599, "value": 75, "type": "1990" }, { "name": 29476, "value": 77.1, "type": "1990" }, { "name": 31476, "value": 75.4, "type": "1990" }, { "name": 28666, "value": 78.1, "type": "1990" }, { "name": 1777, "value": 57.7, "type": "1990" }, { "name": 29550, "value": 79.1, "type": "1990" }, { "name": 2076, "value": 67.9, "type": "1990" }, { "name": 12087, "value": 72, "type": "1990" }, { "name": 24021, "value": 75.4, "type": "1990" }, { "name": 43296, "value": 76.8, "type": "1990" }, { "name": 10088, "value": 70.8, "type": "1990" }, { "name": 19349, "value": 69.6, "type": "1990" }, { "name": 44056, "value": 81.8, "type": "2015" }, { "name": 43294, "value": 81.7, "type": "2015" }, { "name": 13334, "value": 76.9, "type": "2015" }, { "name": 21291, "value": 78.5, "type": "2015" }, { "name": 38923, "value": 80.8, "type": "2015" }, { "name": 37599, "value": 81.9, "type": "2015" }, { "name": 44053, "value": 81.1, "type": "2015" }, { "name": 42182, "value": 82.8, "type": "2015" }, { "name": 5903, "value": 66.8, "type": "2015" }, { "name": 36162, "value": 83.5, "type": "2015" }, { "name": 1390, "value": 71.4, "type": "2015" }, { "name": 34644, "value": 80.7, "type": "2015" }, { "name": 34186, "value": 80.6, "type": "2015" }, { "name": 64304, "value": 81.6, "type": "2015" }, { "name": 24787, "value": 77.3, "type": "2015" } ] } ``` 备注:代码格式按上边格式写,才可渲染效果; ![](https://img.kancloud.cn/fc/6e/fc6e0917260fe698da0a179d80f4601b_1132x537.png) ![](https://img.kancloud.cn/3c/dc/3cdc333649d9d3d0d0c0c068d9ef6fd9_804x24.png)