Working with Charts

From Apache OpenOffice Wiki
Jump to: navigation, search

Document Structure

The important service for charts is The chart document contains all the top-level graphic objects, such as a legend, up to two titles called Title and Subtitle, an axis title object for each primary axis if the chart supports axis. The always exists. This is the rectangular region covering the complete chart documents background. The important graphical object is the diagram that actually contains the visualized data.

Apart from the graphical objects, the chart document is linked to some data. The required service for the data component is It is used for attaching a data change listener and querying general properties of the data source, such as the number to be interpreted as NaN ("not a number"), that is, a missing value. The derived class allows access to the actual values. Every component providing the ChartData service should also support ChartDataArray.

The following diagram shows the services contained in a chart and their relationships.


The name spaces in the diagram have been omitted to improve readability. The services are all in the name space The interfaces in this diagram are,,, and

The chart document model passes its elements through the interface This interface consists of the following methods:

  com::sun::star::chart::XChartData getData()
  void attachData( [in] com::sun::star::chart::XChartData xData)
  com::sun::star::drawing::XShape getTitle()
  com::sun::star::drawing::XShape getSubTitle()
  com::sun::star::drawing::XShape getLegend()
  com::sun::star::beans::XPropertySet getArea()
  com::sun::star::chart::XDiagram getDiagram()
  void setDiagram( [in] com::sun::star::chart::XDiagram xDiagram)
  void dispose()
  void addEventListener( [in] com::sun::star::lang::XEventListener xListener)
  void removeEventListener( [in] com::sun::star::lang::XEventListener aListener)
  boolean attachResource( [in] string aURL,
  [in] sequence <com::sun::star::beans::PropertyValue aArgs)
  string getURL()
  sequence <com::sun::star::beans::PropertyValue > getArgs()
  void connectController( [in] com::sun::star::frame::XController xController)
  void disconnectController( [in] com::sun::star::frame::XController xController)
  void lockControllers()
  void unlockControllers()
  boolean hasControllersLocked()
  com::sun::star::frame::XController getCurrentController()
  void setCurrentController( [in] com::sun::star::frame::XController xController)
  com::sun::star::uno::XInterface getCurrentSelection()
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages