This page covers a next version of Handsontable, and is not published yet.

This page covers a non-latest version of Handsontable.

# SamplesGenerator

# Members

# allowDuplicates

Source code (opens new window)

samplesGenerator.allowDuplicates : boolean

true if duplicate samples collection should be allowed, false otherwise.

Default: {false}

# customSampleCount

Source code (opens new window)

samplesGenerator.customSampleCount : number

Custom number of samples to take of each value length.

Default: {null}

# dataFactory

Source code (opens new window)

samplesGenerator.dataFactory : function

Function which give the data to collect samples.

# SAMPLE_COUNT

Source code (opens new window)

SamplesGenerator.SAMPLE_COUNT : number

Number of samples to take of each value length.

# samples

Source code (opens new window)

samplesGenerator.samples : Map

Samples prepared for calculations.

Default: {null}

# Methods

# generateColumnSamples

Source code (opens new window)

samplesGenerator.generateColumnSamples(colRange, rowRange) ⇒ object

Generate samples for column. You can control which area should be sampled by passing colRange object and rowRange object.

Param Type Description
colRange object Column index.
rowRange object Column index.

# generateRowSamples

Source code (opens new window)

samplesGenerator.generateRowSamples(rowRange, colRange) ⇒ object

Generate samples for row. You can control which area should be sampled by passing rowRange object and colRange object.

Param Type Description
rowRange object
number
The rows range to generate the samples.
colRange object The column range to generate the samples.

# generateSample

Source code (opens new window)

samplesGenerator.generateSample(type, range, specifierValue) ⇒ Map

Generate sample for specified type (row or col).

Param Type Description
type string Samples type row or col.
range object The range to generate the samples.
specifierValue number The range to generate the samples.

# generateSamples

Source code (opens new window)

samplesGenerator.generateSamples(type, range, specifierRange) ⇒ Map

Generate collection of samples.

Param Type Description
type string Type to generate. Can be col or row.
range object The range to generate the samples.
specifierRange object
number
The range to generate the samples.

# getSampleCount

Source code (opens new window)

samplesGenerator.getSampleCount() ⇒ number

Get the sample count for this instance.

# setAllowDuplicates

Source code (opens new window)

samplesGenerator.setAllowDuplicates(allowDuplicates)

Set if the generator should accept duplicate values.

Param Type Description
allowDuplicates boolean true to allow duplicate values.

# setSampleCount

Source code (opens new window)

samplesGenerator.setSampleCount(sampleCount)

Set the sample count.

Param Type Description
sampleCount number Number of samples to be collected.
Last Updated: Apr 19, 2024