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

feat: initial radar chart #413

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

casesolved-co-uk
Copy link

@casesolved-co-uk casesolved-co-uk commented May 19, 2023

Basic implementation of polar radar charts
Satisfies #151

Needs documentation, where do I put that?

fix: first rendering version without axis
feat: radial axis working but buggy, and tidy
feat: radar theta axis
fix: radar bugs and tidy
fix: missing state variable

Explanation About What Code Achieves:
  • Radar chart / spider graph
Screenshots/GIFs:

Screen Shot 2023-05-18 at 22 06 33

Steps To Test:
let radar_data = {
	labels: [
		"Marketing & Communication",
		"Financial",
		"Technology",
		"Green Agenda",
		"Workforce Planning",
		"General Advice"
	],

	datasets: [
		{
			name: "Before",
			values: [4, 6, 8, 7, 3, 5]
		},
		{
			name: "After",
			values: [5, 7, 6, 3, 4, 6]
		}
	]
};

function render_radar() {
	new frappe.Chart("#chart-radar", {
		title: "Business Assessment",
		height: 400,
		colors: ["purple", "light-blue"],
		data: radar_data,
		type: 'radar',
		tooltipOptions: {
			formatTooltipX: (d) => (d + "").toUpperCase(),
			formatTooltipY: (d) => d + " pts"
		}
	});
}
TODOs:
  • Animation
  • Other methods

fix: first rendering version without axis
feat: radial axis working but buggy, and tidy
feat: radar theta axis
fix: radar bugs and tidy
fix: missing state variable
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

Successfully merging this pull request may close these issues.

1 participant