Libraries.Interface.Controls.Charts.HistogramWriter Documentation
The HistogramWriter class is part of the set of writers that allow for Charts to save their representation in the form ScalableVectorGraphics. This class will write out all of the necessary text needed to write out an SVG file that will contain the chart.
Example Code
use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.Histogram
use Libraries.Interface.Controls.Charts.HistogramWriter
DataFrame frame
frame:Load("Data.csv")
frame:SetSelectedColumnRange(0,1)
Histogram chart = frame:Histogram()
chart:SetTitle("My Awesome Title")
chart:SetXAxisTitle("Time")
chart:Display()
HistogramWriter writer
output writer:WriteOutChart(chart)
Inherits from: Libraries.Interface.Controls.Charts.ChartWriter, Libraries.Language.Object
Actions Documentation
AddChartArea(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
This action adds a white background to the canvas
Parameters
AddLegend(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
This action adds the labels on the y axis
Parameters
AddOrderingList(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
AddPatternDefinitions(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
This action adds the patterns to be used on chart elements
Parameters
AddRegressionLines(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
AddXLabels(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
This action adds the labels on the x axis
Parameters
AddYLabels(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
This action adds the labels on the y axis
Parameters
Compare(Libraries.Language.Object object)
This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
GetBackground()
GetChartArea()
GetChartAreaHeight()
This action sets the height (percentage) of the chart area.
Return
number:
GetChartAreaPositionX()
add the meta-data character set
Return
number:
GetChartAreaPositionY()
Generate SVG elements for each piece of the chart
Return
number:
GetChartAreaWidth()
This action sets the width (percentage) of the chart area.
Return
number:
GetChartHeight()
This action sets the height (pixel) of the chart.
Return
integer:
GetChartInformation()
This action writes out the Chart by grabbing necessary information from the chart and it will then return all of the necessary text needed to write out an SVG file that will contain the chart.
Return
Example
use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Interface.Controls.Charts.BarChartWriter
DataFrame frame
frame:Load("Data.csv")
frame:SetSelectedColumnRange(0,1)
BarChart chart = frame:BarChart()
chart:Display()
BarChartWriter writer
output writer:WriteOutChart(chart, 1400, 1200)
GetChartTitle()
GetChartWidth()
This action sets the width (pixel) of the chart.
Return
integer:
GetGroupPanels()
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetScriptFilepath()
This action gets the subchart area list.
Return
text:
GetStyleFilepath()
This action writes out the Chart by grabbing necessary information from the chart and it will then return all of the necessary text needed to write out an SVG file that will contain the chart.
Return
text:
Example
use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Interface.Controls.Charts.BarChartWriter
DataFrame frame
frame:Load("Data.csv")
frame:SetSelectedColumnRange(0,1)
BarChart chart = frame:BarChart()
chart:Display()
BarChartWriter writer
output writer:WriteOutChart(chart)
GetSubChartAreas()
GetXAxis()
GetXAxisLabel()
GetXLabels()
GetYAxis()
GetYAxisLabel()
GetYLabels()
HasAccessibility()
This action sets a flag to know if all of the accessibility information should be included. This may be used to reduce the size of the image in cases where it will be used as a flat image such as in a PDF.
Return
boolean:
SetAccessibilityFlag(boolean hasAccessibility)
This action sets a flag to know if all of the accessibility information should be included. This may be used to reduce the size of the image in cases where it will be used as a flat image such as in a PDF.
Parameters
- boolean hasAccessibility
SetBackground(Libraries.Data.Formats.ScalableVectorGraphics.Rectangle background)
SetChartArea(Libraries.Data.Formats.ScalableVectorGraphics.Rectangle chartArea)
SetChartAreaHeight(number height)
This action sets the height (percentage) of the chart area.
Parameters
- number height
SetChartAreaPosition(number x, number y)
This action sets the position (percentage) of the chart area.
Parameters
- number x
- number y
SetChartAreaPositionX(number x)
This action sets the position (percentage) of the chart area.
Parameters
- number x
SetChartAreaPositionY(number y)
This action writes out the Chart by grabbing necessary information from the chart and it will then return all of the necessary text needed to write out an SVG file that will contain the chart.
Parameters
- number y
Example
use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Interface.Controls.Charts.BarChartWriter
DataFrame frame
frame:Load("Data.csv")
frame:SetSelectedColumnRange(0,1)
BarChart chart = frame:BarChart()
chart:Display()
BarChartWriter writer
File f
f:SetPath("aFile.svg")
chartWriter:WriteOutChart(chart, f)
SetChartAreaWidth(number width)
This action sets the width (percentage) of the chart area.
Parameters
- number width
SetChartHeight(integer svgHeight)
This action sets the height (pixel) of the chart.
Parameters
- integer svgHeight
SetChartInformation(Libraries.Data.Formats.ScalableVectorGraphics.Group chartInformation)
This action writes out the Chart by grabbing necessary information from the chart and it will then return all of the necessary text needed to write out an SVG file that will contain the chart.
Parameters
Example
use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Interface.Controls.Charts.BarChartWriter
DataFrame frame
frame:Load("Data.csv")
frame:SetSelectedColumnRange(0,1)
BarChart chart = frame:BarChart()
chart:Display()
BarChartWriter writer
File f
f:SetPath("aFile.svg")
chartWriter:WriteOutChart(chart, f, 1400, 1200)
SetChartTitle(Libraries.Data.Formats.ScalableVectorGraphics.Label chartTitle)
SetChartWidth(integer svgWidth)
This action sets the width (pixel) of the chart.
Parameters
- integer svgWidth
SetScriptFilepath(text scriptFilepath)
This action sets the group panels.
Parameters
- text scriptFilepath
SetStyleFilepath(text styleFilepath)
chartCanvas:SetSize(svgWidth,svgHeight)
Parameters
- text styleFilepath
SetXAxis(Libraries.Data.Formats.ScalableVectorGraphics.Rectangle xAxis)
SetXAxisLabel(Libraries.Data.Formats.ScalableVectorGraphics.Label xAxisLabel)
SetXLabels(Libraries.Containers.Array<Libraries.Data.Formats.ScalableVectorGraphics.Label> xLabels)
SetYAxis(Libraries.Data.Formats.ScalableVectorGraphics.Rectangle yAxis)
SetYAxisLabel(Libraries.Data.Formats.ScalableVectorGraphics.Label yAxisLabel)
SetYLabels(Libraries.Containers.Array<Libraries.Data.Formats.ScalableVectorGraphics.Label> yLabels)
TranslatePositionY(Libraries.Interface.Item2D item)
UniversalUniqueIdentifier()
Regression equation
Return
text:
WriteOutChart(Libraries.Interface.Controls.Charts.Histogram chart)
WriteOutChart(Libraries.Interface.Controls.Charts.Chart chart, Libraries.System.File file)
This action writes out the Chart by grabbing necessary information from the chart and it will then return all of the necessary text needed to write out an SVG file that will contain the chart.
Parameters
- Libraries.Interface.Controls.Charts.Chart: The chart that will be used to create an SVG
- Libraries.System.File: The file object that will be written to
Example
use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Interface.Controls.Charts.BarChartWriter
DataFrame frame
frame:Load("Data.csv")
frame:SetSelectedColumnRange(0,1)
BarChart chart = frame:BarChart()
chart:Display()
BarChartWriter writer
File f
f:SetPath("aFile.svg")
chartWriter:WriteOutChart(chart, f)
WriteOutChart(Libraries.Interface.Controls.Charts.Histogram chart, Libraries.System.File file)
WriteOutChart(Libraries.Interface.Controls.Charts.Chart chart, integer svgWidth, integer svgHeight)
This action writes out the Chart by grabbing necessary information from the chart and it will then return all of the necessary text needed to write out an SVG file that will contain the chart.
Parameters
- Libraries.Interface.Controls.Charts.Chart: The chart that will be used to create an SVG
- integer svgWidth: The width in pixels of the SVG
- integer svgHeight: The height in pixels of the SVG
Return
text:
Example
use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Interface.Controls.Charts.BarChartWriter
DataFrame frame
frame:Load("Data.csv")
frame:SetSelectedColumnRange(0,1)
BarChart chart = frame:BarChart()
chart:Display()
BarChartWriter writer
output writer:WriteOutChart(chart, 1400, 1200)
WriteOutChart(Libraries.Interface.Controls.Charts.Chart chart)
This action writes out the Chart by grabbing necessary information from the chart and it will then return all of the necessary text needed to write out an SVG file that will contain the chart.
Parameters
- Libraries.Interface.Controls.Charts.Chart: The chart that will be used to create an SVG
Return
text:
Example
use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Interface.Controls.Charts.BarChartWriter
DataFrame frame
frame:Load("Data.csv")
frame:SetSelectedColumnRange(0,1)
BarChart chart = frame:BarChart()
chart:Display()
BarChartWriter writer
output writer:WriteOutChart(chart)
WriteOutChart(Libraries.Interface.Controls.Charts.Histogram chart, integer svgWidth, integer svgHeight)
Array
Parameters
- Libraries.Interface.Controls.Charts.Histogram
- integer svgWidth
- integer svgHeight
Return
text:
WriteOutChart(Libraries.Interface.Controls.Charts.Histogram chart, Libraries.System.File file, integer svgWidth, integer svgHeight)
Array
Parameters
- Libraries.Interface.Controls.Charts.Histogram
- Libraries.System.File
- integer svgWidth
- integer svgHeight
WriteOutChart(Libraries.Interface.Controls.Charts.Chart chart, Libraries.System.File file, integer svgWidth, integer svgHeight)
This action writes out the Chart by grabbing necessary information from the chart and it will then return all of the necessary text needed to write out an SVG file that will contain the chart.
Parameters
- Libraries.Interface.Controls.Charts.Chart: The chart that will be used to create an SVG
- Libraries.System.File: The file object that will be written to
- integer svgWidth: The width in pixels of the SVG
- integer svgHeight: The height in pixels of the SVG
Example
use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Interface.Controls.Charts.BarChartWriter
DataFrame frame
frame:Load("Data.csv")
frame:SetSelectedColumnRange(0,1)
BarChart chart = frame:BarChart()
chart:Display()
BarChartWriter writer
File f
f:SetPath("aFile.svg")
chartWriter:WriteOutChart(chart, f, 1400, 1200)
WriteOutHTML(Libraries.Interface.Controls.Charts.Histogram chart, Libraries.System.File file)
WriteOutHTML(Libraries.Interface.Controls.Charts.Chart chart, Libraries.System.File file)
Generate SVG elements for each piece of the chart
Parameters
On this page
Variables TableAction Documentation- AddChartArea(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
- AddLegend(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
- AddOrderingList(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
- AddPatternDefinitions(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
- AddRegressionLines(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
- AddXLabels(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
- AddYLabels(Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphics canvas, Libraries.Interface.Controls.Charts.Chart chart)
- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetBackground()
- GetChartArea()
- GetChartAreaHeight()
- GetChartAreaPositionX()
- GetChartAreaPositionY()
- GetChartAreaWidth()
- GetChartHeight()
- GetChartInformation()
- GetChartTitle()
- GetChartWidth()
- GetGroupPanels()
- GetHashCode()
- GetScriptFilepath()
- GetStyleFilepath()
- GetSubChartAreas()
- GetXAxis()
- GetXAxisLabel()
- GetXLabels()
- GetYAxis()
- GetYAxisLabel()
- GetYLabels()
- HasAccessibility()
- SetAccessibilityFlag(boolean hasAccessibility)
- SetBackground(Libraries.Data.Formats.ScalableVectorGraphics.Rectangle background)
- SetChartArea(Libraries.Data.Formats.ScalableVectorGraphics.Rectangle chartArea)
- SetChartAreaHeight(number height)
- SetChartAreaPosition(number x, number y)
- SetChartAreaPositionX(number x)
- SetChartAreaPositionY(number y)
- SetChartAreaWidth(number width)
- SetChartHeight(integer svgHeight)
- SetChartInformation(Libraries.Data.Formats.ScalableVectorGraphics.Group chartInformation)
- SetChartTitle(Libraries.Data.Formats.ScalableVectorGraphics.Label chartTitle)
- SetChartWidth(integer svgWidth)
- SetScriptFilepath(text scriptFilepath)
- SetStyleFilepath(text styleFilepath)
- SetXAxis(Libraries.Data.Formats.ScalableVectorGraphics.Rectangle xAxis)
- SetXAxisLabel(Libraries.Data.Formats.ScalableVectorGraphics.Label xAxisLabel)
- SetXLabels(Libraries.Containers.Array
xLabels) - SetYAxis(Libraries.Data.Formats.ScalableVectorGraphics.Rectangle yAxis)
- SetYAxisLabel(Libraries.Data.Formats.ScalableVectorGraphics.Label yAxisLabel)
- SetYLabels(Libraries.Containers.Array
yLabels) - TranslatePositionY(Libraries.Interface.Item2D item)
- UniversalUniqueIdentifier()
- WriteOutChart(Libraries.Interface.Controls.Charts.Histogram chart)
- WriteOutChart(Libraries.Interface.Controls.Charts.Chart chart, Libraries.System.File file)
- WriteOutChart(Libraries.Interface.Controls.Charts.Histogram chart, Libraries.System.File file)
- WriteOutChart(Libraries.Interface.Controls.Charts.Chart chart, integer svgWidth, integer svgHeight)
- WriteOutChart(Libraries.Interface.Controls.Charts.Chart chart)
- WriteOutChart(Libraries.Interface.Controls.Charts.Histogram chart, integer svgWidth, integer svgHeight)
- WriteOutChart(Libraries.Interface.Controls.Charts.Histogram chart, Libraries.System.File file, integer svgWidth, integer svgHeight)
- WriteOutChart(Libraries.Interface.Controls.Charts.Chart chart, Libraries.System.File file, integer svgWidth, integer svgHeight)
- WriteOutHTML(Libraries.Interface.Controls.Charts.Histogram chart, Libraries.System.File file)
- WriteOutHTML(Libraries.Interface.Controls.Charts.Chart chart, Libraries.System.File file)