如何在数据库中使用网络可视化图表?

问题描述

如何在数据库中使用网络可视化图表?

Here is my code 用于网络可视化图表:

const dataSource = {
  chart: {
    caption: "ISP Routing Path",xaxisminvalue: "0",xaxismaxvalue: "100",yaxisminvalue: "0",yaxismaxvalue: "100",theme: "fusion",basefontsize: "11",plothovereffect: "0"
  },dataset: [
    {
      data: [
        {
          id: "isp",x: "80",y: "83",alpha: "0",name: "ISP",radius: "60",shape: "CIRCLE",imagenode: "1",imagealign: "MIDDLE",imageheight: "50",imagewidth: "50",imageurl: "https://s8.postimg.cc/k0pea9uw5/globe.png"
        },{
          id: "modem",x: "55",label: "Modem",imageheight: "30",imagewidth: "40",imageurl: "https://s8.postimg.cc/3qz87kmut/electronics.png"
        },{
          id: "router",x: "45",y: "65",name: "Master Router",imageheight: "40",imageurl: "https://s8.postimg.cc/io7p89uut/router.png"
        },{
          id: "subrouter1",x: "20",y: "55",name: "Sub Router 1",{
          id: "subrouter2",x: "75",y: "45",name: "Sub Router 2",{
          id: "subrouter3",x: "40",name: "Sub Router 3",{
          id: "desktop-srouter1",x: "10",y: "30",name: "Public Desktop",imageurl: "https://s8.postimg.cc/b9idg2911/multimedia.png"
        },{
          id: "nas-srouter1",name: "Network Storage",imageheight: "20",imagewidth: "30",imageurl: "https://s8.postimg.cc/mymd3sfcl/nas.png"
        },{
          id: "mobile1-srouter2",x: "65",y: "20",label: "Ronnie's Mobile",imagewidth: "15",imageurl: "https://s8.postimg.cc/ec4ebmm0l/image.png"
        },{
          id: "mobile2-srouter2",x: "90",y: "25",label: "Julliet's Mobile",{
          id: "laptop1-srouter2",y: "15",name: "Romeo's Laptop",imageheight: "45",imagewidth: "60",imageurl: "https://s8.postimg.cc/qd94xq5at/new_laptop.png"
        },{
          id: "st-srouter3",x: "30",name: "Smart TV",imageurl: "https://s8.postimg.cc/wbmy7t3n9/image.png"
        },{
          id: "desktop-srouter3",name: "Amy's Desktop",{
          id: "mobile-srouter3",y: "35",label: "Amy's Mobile",imageurl: "https://s8.postimg.cc/ec4ebmm0l/image.png"
        }
      ]
    }
  ],connectors: [
    {
      stdthickness: "2",connector: [
        {
          from: "isp",to: "modem",color: "#1aaf5d",strength: "1",arrowatstart: "0",arrowatend: "0"
        },{
          from: "modem",to: "router",{
          from: "router",to: "subrouter1",to: "subrouter2",to: "subrouter3",{
          from: "subrouter1",to: "desktop-srouter1",to: "nas-srouter1",{
          from: "subrouter2",to: "mobile1-srouter2",to: "mobile2-srouter2",to: "laptop1-srouter2",{
          from: "subrouter3",to: "st-srouter3",to: "desktop-srouter3",to: "mobile-srouter3",arrowatend: "0"
        }
      ]
    }
  ]
};

FusionCharts.ready(function() {
  var myChart = new FusionCharts({
    type: "dragnode",renderAt: "chart-container",width: "100%",height: "100%",dataFormat: "json",dataSource
  }).render();
});
#chart-container{
 height: 500px; 
}
<div id="chart-container"></div>

我想要来自数据库的数据。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)