Chart Options"

From Documentation
Line 5: Line 5:
 
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:
 
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">
 
<source lang="java">
     // Get the Tooltip from chart if any. Otherwise, it will create a new one and return
+
     // Get the Title from chart if any. Otherwise, it will create a new one.
 
     Title title = chart.getTitle();
 
     Title title = chart.getTitle();
  

Revision as of 08:25, 5 March 2014

WarningTriangle-32x32.png This page is under construction, so we cannot guarantee the accuracy of the content!

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 chart.getTitle() method to get the Title object then modify its attrubutes as below:

    // 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);

Of course you can create a new tooltip and assign to chart:

    // 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);

< Get Complete Source Code of This Book >


Last Update : 2014/03/05

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.