piePlot
The piePlot
method creates category histograms using data from Deephaven tables.
Syntax
piePlot(seriesName, t, categories, y)
piePlot(seriesName, categories, y)
piePlot(seriesName, sds, categories, y)
Parameters
Parameter | Type | Description |
---|---|---|
seriesName | String | The name (as a String) you want to use to identify the series on the plot itself. |
t | Table | The table that holds the data to be plotted. |
sds | SelectableDataSet | A selectable data set (e.g., OneClick filterable table). |
categories | String | The name of the column in |
categories | IndexableData | Data. |
categories | List<T> | Data. |
categories | <T>[] | Data. |
y | String | Column in |
y | double[] | Numeric data. |
y | float[] | Numeric data. |
y | int[] | Numeric data. |
y | long[] | Numeric data. |
y | short[] | Numeric data. |
y | List<T> | Numeric data. |
y | <T>[] | Numeric data. |
Returns
A pie chart.
Examples
The following example plots data from a Deephaven table.
import static io.deephaven.csv.CsvTools.readCsv
totalInsurance = readCsv("https://media.githubusercontent.com/media/deephaven/examples/main/Insurance/csv/insurance.csv")
regionInsurance = totalInsurance.view("region", "expenses").sumBy("region")
pieChart = piePlot("Expense per region", regionInsurance, "region", "expenses")\
.chartTitle("Expenses per region")\
.show()
- totalInsurance
- regionInsurance
- pieChart