<%// ChangeAngle:%>


<%
// To change the starting angle of the first axis line in a
// chart, get the RadarChart's graph model and call the
// model's setStartAngle() method
%>

<%@page import="com.sas.swing.models.TableModelAdapter,
                 com.sas.models.SimpleTable,
                 com.sas.servlet.tbeans.graphics.html.RadarChart,
                 com.sas.graphics.components.radarchart.RadarChartModel,
                 com.sas.graphics.components.radarchart.RadarChartTableDataModel,
                 com.sas.graphics.components.AnalysisVariable,
                 com.sas.graphics.components.ClassificationVariable"
                 %>

<%

  // Create a simple SAS table and add data to it
     SimpleTable table = new SimpleTable();
%>

<%@ include file="FailData.jsp"%>

<% 
     // Convert a simple SAS table to a simple Java Swing table
        TableModelAdapter tma = new TableModelAdapter(table);
        tma.setFormattedDataUsed(false);

     // Create a data model and attach the data source to it
        RadarChartTableDataModel radarChartDataModel=
           new RadarChartTableDataModel(tma);

     // Assign the Category and Response variable roles
        radarChartDataModel.setCategoryVariable(
           new ClassificationVariable("Cause"));
        radarChartDataModel.setResponseVariable(
           new AnalysisVariable("Count"));

     // Create a radar chart and get its graph model
        RadarChart radarChart=new RadarChart(radarChartDataModel);
        RadarChartModel graphModel=radarChart.getGraphModel();

     // Set the start angle
        graphModel.setStartAngle(20);

     // Assign the data model to the RadarChart
        radarChart.setDataModel(radarChartDataModel);

     // Set a title
        radarChart.getTitle1().setText("Causes of Failure");
     
     // Set HTTP-specific response and request functionality
        radarChart.setResponse(response);
        radarChart.setRequest(request);

     // Write the chart to the display
        radarChart.write(out);
%>