Class Chart
java.lang.Object
com.independentsoft.office.odf.Document
com.independentsoft.office.odf.charts.Chart
The Class Chart.
-
Field Summary
Fields inherited from class com.independentsoft.office.odf.Document
commonStyles, customFileTable, inputFileTable, isTemplate, manifest, metaData, mimeType, outputStream, settings, utf8 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Gets the automatic styles.byte[]getBytes()Gets the bytes.Gets the content.Returns all content elements.getFonts()Gets the fonts.getHtml()Converts the chart to HTML format.Gets the input stream.Gets the office scripts.voidopen(InputStream inputStream)Open.voidOpen.protected voidopenImplementation(InputStream inputStream)voidrenameStyle(Style style, String newName)Rename style.voidsave(OutputStream outputStream)Save.voidSave.voidSave.voidsaveAsHtml(OutputStream stream)Saves the chart in HTML format.voidsaveAsHtml(String file)Saves the chart in HTML format.voidsaveAsHtml(String file, boolean overwrite)Saves the chart in HTML format.toSvg(double width, double height)Renders the chart as an SVG fragment.Methods inherited from class com.independentsoft.office.odf.Document
addFile, addFile, addManifestEntry, addMimeTypeFile, addPreservedEmbeddedObjectManifestEntries, find, find, findElements, findElements, findElements, findFirst, findFirst, getAttributedTexts, getCommonStyles, getConfigurations, getCreationDate, getCreator, getCustomFileTable, getDescription, getEditingCycles, getEditingDuration, getFields, getFileInputTable, getGenerator, getHeadings, getImages, getInitialCreator, getInputFileTable, getKeywords, getLanguage, getLastModified, getLists, getManifest, getMetaData, getMimeType, getParagraphs, getPreservedPackageParts, getPrintDate, getPrintedBy, getSections, getStatistic, getSubject, getTables, getTemplate, getText, getTexts, getTitle, getUserDefinedMetadataElements, isTemplate, remove, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replaceContent, setCreationDate, setCreator, setDescription, setEditingCycles, setEditingDuration, setInitialCreator, setKeywords, setLanguage, setLastModified, setMimeType, setPrintDate, setPrintedBy, setStatistic, setSubject, setTemplate, setTemplate, setTitle
-
Constructor Details
-
Chart
public Chart()Instantiates a new chart. -
Chart
Instantiates a new chart.- Parameters:
file- the file- Throws:
IOException- Signals that an I/O exception has occurred.XMLStreamException- the xML stream exception
-
Chart
Instantiates a new chart.- Parameters:
inputStream- the input stream- Throws:
IOException- Signals that an I/O exception has occurred.XMLStreamException- the xML stream exception
-
Chart
Instantiates a new chart.- Parameters:
folder- the folderinputFileTable- the input file table- Throws:
IOException- Signals that an I/O exception has occurred.XMLStreamException- the xML stream exception
-
-
Method Details
-
open
Description copied from class:DocumentOpen.- Specified by:
openin classDocument- Parameters:
filePath- the file- Throws:
IOException- Signals that an I/O exception has occurred.XMLStreamException- the xML stream exception
-
open
Description copied from class:DocumentOpen.- Specified by:
openin classDocument- Parameters:
inputStream- the stream- Throws:
IOException- Signals that an I/O exception has occurred.XMLStreamException- the xML stream exception
-
openImplementation
- Overrides:
openImplementationin classDocument- Throws:
IOExceptionXMLStreamException
-
renameStyle
Rename style.- Parameters:
style- the stylenewName- the new name
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin classDocument- Returns:
- A collection of content elements.
-
clone
Creates a new object that is a deep copy of the current instance. -
save
Description copied from class:DocumentSave.- Specified by:
savein classDocument- Parameters:
filePath- the file- Throws:
IOException- Signals that an I/O exception has occurred.
-
save
Description copied from class:DocumentSave.- Specified by:
savein classDocument- Parameters:
filePath- the fileoverwrite- the overwrite- Throws:
IOException- Signals that an I/O exception has occurred.
-
save
Description copied from class:DocumentSave.- Specified by:
savein classDocument- Parameters:
outputStream- the stream- Throws:
IOException- Signals that an I/O exception has occurred.
-
getInputStream
Description copied from class:DocumentGets the input stream.- Specified by:
getInputStreamin classDocument- Returns:
- the input stream
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getBytes
Description copied from class:DocumentGets the bytes.- Specified by:
getBytesin classDocument- Returns:
- the bytes
- Throws:
IOException- Signals that an I/O exception has occurred.
-
toSvg
Renders the chart as an SVG fragment.- Parameters:
width- The target width in pixels.height- The target height in pixels.- Returns:
- The SVG markup, or null when the chart type is not supported.
-
saveAsHtml
Saves the chart in HTML format.- Specified by:
saveAsHtmlin classDocument- Parameters:
file- The path of the file to save.- Throws:
IOException- Signals that an I/O exception has occurred.
-
saveAsHtml
Saves the chart in HTML format.- Specified by:
saveAsHtmlin classDocument- Parameters:
file- The path of the file to save.overwrite- If true, overwrites an existing file.- Throws:
IOException- Signals that an I/O exception has occurred.
-
saveAsHtml
Saves the chart in HTML format.- Specified by:
saveAsHtmlin classDocument- Parameters:
stream- The stream to save to.- Throws:
IOException- Signals that an I/O exception has occurred.
-
getHtml
Converts the chart to HTML format. The chart is rendered as an inline SVG image.- Specified by:
getHtmlin classDocument- Returns:
- The HTML representation of the chart.
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getContent
Gets the content.- Returns:
- the content
-
getFonts
Gets the fonts.- Returns:
- the fonts
-
getOfficeScripts
Gets the office scripts.- Returns:
- the office scripts
-
getAutomaticStyles
Gets the automatic styles.- Returns:
- the automatic styles
-