skip to main content
Programmer's documentation > Developing with the JViews Charts SDK > Creating a Chart > Creating a basic polar chart
 
Creating a basic polar chart
You are going to create a polar chart to represent the morning and afternoon mean temperatures. The days of the week will be represented along the abscissa and the temperatures along the ordinate. The abscissa values will be mapped along a circular scale and the ordinate values will be displayed radially. You will customize the scales and finally, you will add a legend to the chart.
Example Polar Chart
The complete source code of this example can be found in <installdir>/jviews-charts/codefragments/chart/basic-polar/src/Polar.java.
Creating the Data Model
*Create the data model and put the data to be displayed into the data source. Use the same data and procedures as for the Cartesian chart example. See Creating the data model.
Creating a Polar Chart
1. To create a polar chart, use the following code:
 IlvChart chart = new IlvChart(IlvChart.POLAR);
chart.setAngleRange(180);
2. Create an instance of IlvChart, and pass the IlvChart.POLAR type constant as parameter to the constructor.
3. Set the angle range to 180 degrees, specifying the angle range within which the data will be projected on the screen.
Creating and Adding the Renderers
*Because you use the same graphical representation for your data, you will use the same renderers as for the Cartesian chart. See Creating and adding the renderers.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.