0
Amcharts/HTML amateur here!我想複製我的同事做了一個圖表,但我再也不能看到代碼:Amcharts雷達圖表
,但我不能讓我的類別字段自動換行。標籤太長,我寧願將整個.jpeg
變成方形而不是矩形。我試過像上面那樣插入"autoWrap": true
,但我無法弄清楚如何正確地將它放在HTML中。我也試圖插入\n
,但再次,不能得到那個工作。請看我目前的雷達圖和HTML。我究竟做錯了什麼??
{
"type": "radar",
"categoryField": "Quality",
"gridAboveGraphs": true,
"startDuration": 2,
"fontFamily": "Gill Sans MT",
"handDrawThickness": 0,
"export": {
"enabled": true
},
"graphs": [
{
"accessibleLabel": "Vietnam",
"balloonColor": "#BA0C2F",
"fillColors": "#BA0C2F",
"id": "Vietnam",
"labelAnchor": "middle",
"labelPosition": "bottom",
"labelText": "",
"legendValueText": "",
"lineColor": "#BA0C2F",
"negativeFillAlphas": 0.11,
"negativeFillColors": "#BA0C2F",
"title": "Vietnam",
"valueAxis": "ValueAxis-1",
"valueField": "Vietnam",
"xAxis": "ValueAxis-1",
"yAxis": "ValueAxis-1"
},
{
"accessibleLabel": "East Asia and Pacific Average",
"balloonColor": "#",
"fillColors": "#002F6C",
"id": "East Asia and Pacific Average",
"legendPeriodValueText": "East Asia Pacific",
"legendValueText": "East Asia Pacific",
"lineColor": "#002F6C",
"markerType": "square",
"negativeFillAlphas": 0,
"negativeFillColors": "#002F6C",
"title": "East Asia and Pacific Average",
"valueField": "East Asia Pacific Average"
},
{
"fillColors": "#8C8985",
"id": "AmGraph-4",
"lineColor": "#8C8985",
"title": "Lower Middle Income Average",
"valueField": "Lower Middle Income Average"
},
{
"fillColors": "#A7C6ED",
"id": "AmGraph-5",
"lineColor": "#A7C6ED",
"title": "United States",
"valueField": "United States"
}
],
"guides": [],
"valueAxes": [
{
"id": "ValueAxis-1",
"dashLength": 3
}
],
"allLabels": [],
"balloon": {},
"titles": [],
"dataProvider": [
{
"Vietnam": "3.528",
"East Asia Pacific Average": "4.09",
"Lower Middle Income Average": "3.5",
"United States": "4.85",
"Quality": "Quality of the Education system"
},
{
"Vietnam": "4.156654705",
"East Asia Pacific Average": "4.4",
"Lower Middle Income Average": "3.72",
"United States": "4.51",
"Quality": "Quality of math and science education"
},
{
"Vietnam": "3.337434009",
"East Asia Pacific Average": "3.82",
"Lower Middle Income Average": "2.9",
"United States": "6.09",
"Quality": "Quality of Scientific Research Institutions"
},
{
"Vietnam": "3.27048357",
"East Asia Pacific Average": "3.96",
"Lower Middle Income Average": "2.97",
"United States": "5.85",
"Quality": "University-Industry Collaboration in R&D"
},
{
"Vietnam": "3.919624581",
"East Asia Pacific Average": "4.29",
"Lower Middle Income Average": "3.72",
"United States": "5.42",
"Quality": "Availability of Scientists and Engineers"
}
]
}