|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
− | {{ZKChartsEssentialsPageHeader}}
| |
| | | |
− | {{Template:UnderConstruction}}
| |
− |
| |
− | ZK Charts provides a set of comprehensive API for chart initial configuration, you can change the configuration very easy by simply calling Java getter methods. For example, if we want to change the title's configuration, we can call <tt>chart.getTitle()</tt> method to get the <tt>Title</tt> object then modify its attrubutes as below:
| |
− | <source lang="java">
| |
− | // Get the Title from chart if any. Otherwise, it will create a new one.
| |
− | Title title = chart.getTitle();
| |
− |
| |
− | // Set some attributes
| |
− | title.setText("It's a title");
| |
− | title.setX(100);
| |
− | title.setY(250);
| |
− | </source>
| |
− |
| |
− | Of course you can create a new tooltip and assign to chart:
| |
− | <source lang="java">
| |
− | // Create a new Title
| |
− | Title title = new Title();
| |
− |
| |
− | // Set some attributes
| |
− | title.setText("It's a title");
| |
− | title.setX(100);
| |
− | title.setY(250);
| |
− |
| |
− | // Assign title to chart
| |
− | chart.setTitle(title);
| |
− | </source>
| |
− |
| |
− | {{ZKChartsEssentialsPageFooter}}
| |