I am having some issues making a pie chart.. I have put in values in the pie: "label by percent of total values". However some of these numbers are put on top of each other. Does anyone know how to move them?
Thank you so much,
If the labels are overwritten, then you must have some groups with very small percentages. Below is an example using JSL, but you could do the same with point and click. If you have very small percentage groups, I suggest you:
This script looks long, but it is creating the table; creating the Pie Chart with the raw data; then performing the steps described above. Note, the table is created wth random integers, so your pie chart will not be identical to the one displayed above.
Names Default to Here(1); dt = New Table("Test", add rows(75), New Column("Age", numeric, formula(Random Integer(30,80)))); //create a Pie Chart using Pie chart Labels gb1 = dt << Graph Builder( Show Control Panel(0), Size( 495, 440 ), Show Control Panel( 0 ), Variables( X( :Age ) ), Elements( Pie( X, Legend( 6 ), Label( "Label by Percent of Total Values" ) ) ) ); //some labels are overwritten, only fix is to make the framesize larger or //create custom labels with rotated text //Alternative, create a summary table of categories, label the rows, do not label the //rows with very small percentages dtsum = dt << Summary( Group( :Age ), Name( "% of Total" ), Freq( "None" ), Weight( "None" ) ); //Make % of Total the label dtsum:Name("% of Total") << Set Labelled; //Label only larger % dtsum << Select Where(:Name("% of Total") >=.02); dtsum << Label; dtsum << clear select; //Create Pie Chart gb2 = dtsum <<Graph Builder( Show Control Panel(0), Variables( X( :Age ), Y( :Name( "% of Total" ) ) ), Elements( Pie( X, Y, Legend( 6 ) ) ) ); Report(gb2)[OutlineBox(1)] << Set Title("Pie Chart of Age - Groups representing <2% are not labeled")
There are 3 ways to do this:
That is why I find the method, I sent previously, the easiest to do.
There are no labels assigned to this post.