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

startAngle on radar chart value out of chart #3612

Closed
jadenjm opened this issue Nov 17, 2016 · 3 comments · Fixed by #4682
Closed

startAngle on radar chart value out of chart #3612

jadenjm opened this issue Nov 17, 2016 · 3 comments · Fixed by #4682

Comments

@jadenjm
Copy link

jadenjm commented Nov 17, 2016

i try to rotate my chart using startAnlge by 90 the value mark is running out the chart. Not sure it is i miss out any option setting to the chart but i did some google unable find any soultion to it.

image

@Jareechang
Copy link
Contributor

@jadenjm do happen to have a code sample? It would help out a lot

@jadenjm
Copy link
Author

jadenjm commented Nov 29, 2016

yes i trying on sample code radar-skip-points.html with some edit.
i had tried on sample code with adding startAngle: 90 in the option it will show the bug too.

Here is the code:

<!doctype html>

<title>Radar Chart</title> <script src="../dist/Chart.bundle.js"></script> <script src="../dist/jquery.min.js"></script> <style> canvas { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } </style>
<script>


var config = {
    type: 'radar',
    data: {
        labels: ["Right", "Right-Bottom", "Left-Bottom", "Left", "Left-Top", "Right-Top"],
        datasets: [{
            label: "Skip first dataset",
            borderColor: 'rgb(255, 0, 0)',
            backgroundColor: "rgba(255,255,0,0.5)",
            pointBackgroundColor: "rgba(220,220,220,1)",
            data: [10, 20, 30, 40, 50, 60]
        }]
    },
    options: {
		startAngle: 90,
        title:{
            display:true,
            text:"Chart.js Radar Chart - Skip Points"
        },
        elements: {
            line: {
                tension: 0.0,
            }
        },
        scale: {
            beginAtZero: false,
            reverse: false,	
			ticks: {
			//display: false,
			
			}
			
        },
		
		
		//animation: {
			//onComplete: function (animation) { 
			//this.toBase64Image();
			//console.log(animation.chartInstance.toBase64Image();
			//},
		
		
    //},
	}
};

window.onload = function() {
    window.myRadar = new Chart(document.getElementById("canvas"), config);
	
	
};

//save64Img(myRadar.toBase64Image());

</script>




<?php 

//$data = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $img));

//file_put_contents('../image.png', $data);

?>

@etcetera8
Copy link

Is there anyway we could make this optional? I like having the labels be vertical despite the angle of the chart. Maybe even have a tick option startAngle where we could angle the chart one way and reangle the ticks a different way. Thoughts?

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

Successfully merging a pull request may close this issue.

4 participants