Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

radar Radar charts do not support label display #62

Closed
AutismPatient opened this issue Nov 13, 2023 · 4 comments
Closed

radar Radar charts do not support label display #62

AutismPatient opened this issue Nov 13, 2023 · 4 comments

Comments

@AutismPatient
Copy link

AutismPatient commented Nov 13, 2023

The label value is not displayed after following the example configuration

my code:

func main() {
	buf, err := charts.RenderEChartsToSVG(`{
		"title": "",
		"radar": {
		  "shape": "circle",
		  "indicator": [
			{ "name": "Sales", "max": 6500 },
			{ "name": "Administration", "max": 16000 },
			{ "name": "Information Technology", "max": 30000 },
			{ "name": "Customer Support", "max": 38000 },
			{ "name": "Development", "max": 52000 },
			{ "name": "Marketing", "max": 25000 }
		  ],
		  "splitNumber": 3,
		},
		"series": [
		  {
			"name": "Budget vs spending",
			"type": "radar",
			"data": [
			  {
				"value": [4200, 3000, 20000, 35000, 50000, 18000],
				"name": "Allocated Budget"
			  }
			],
			"label": {
			  "show": true
			}
		  }
		]
	  }`)
	if err != nil {
		panic(err)
	}
	fmt.Println(string(buf))
}

Echarts Official code examples:

import * as echarts from 'echarts';

var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var option;

option = {
  title: '',
  radar: {
    shape: 'circle',
    indicator: [
      { name: 'Sales', max: 6500 },
      { name: 'Administration', max: 16000 },
      { name: 'Information Technology', max: 30000 },
      { name: 'Customer Support', max: 38000 },
      { name: 'Development', max: 52000 },
      { name: 'Marketing', max: 25000 }
    ],
    splitNumber: 3
  },
  series: [
    {
      name: 'Budget vs spending',
      type: 'radar',
      data: [
        {
          value: [4200, 3000, 20000, 35000, 50000, 18000],
          name: 'Allocated Budget'
        }
      ],
      label: {
        show: true
      }
    }
  ]
};

option && myChart.setOption(option);

Echarts Example rendering:
image

@AutismPatient AutismPatient closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2023
@AutismPatient AutismPatient changed the title 使用 RenderEChartsToSVG 函数渲染发生字符意外错误! radar Radar charts do not support label display Dec 1, 2023
@AutismPatient AutismPatient reopened this Dec 1, 2023
@AutismPatient AutismPatient changed the title radar Radar charts do not support label display radar Radar charts do not support label display Dec 1, 2023
@vicanso
Copy link
Owner

vicanso commented Dec 27, 2023

I'm sorry not all echart options are supported.

@AutismPatient
Copy link
Author

Can you add some options to the radar chart😊

@vicanso
Copy link
Owner

vicanso commented Dec 27, 2023

Please try the latest version 2.6.2

@vicanso
Copy link
Owner

vicanso commented Dec 27, 2023

By the way, you can try using charts-rs,which is better performance and simplicity.
And you can try to use the web demo page, https://charts.npmtrend.com/ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants