Skip to main content

Class: StarsStatisticalModel

A class representing the statistical data of the star ratings of reviews.

Constructors

constructor

new StarsStatisticalModel(mean, median, standardDeviation, lowerQuartile, upperQuartile, interquartileRange)

Creates a new StarsStatisticalModel instance.

Parameters

NameTypeDescription
meannumberThe mean (average) of the star ratings.
mediannumberThe median (middle value) of the star ratings.
standardDeviationnumberThe standard deviation of the star ratings.
lowerQuartilenumberThe lower quartile (Q1) of the star ratings.
upperQuartilenumberThe upper quartile (Q3) of the star ratings.
interquartileRangenumberThe interquartile range (IQR) of the star ratings.

Defined in

components/StarsStatisticalModel.tsx:22

Properties

interquartileRange

interquartileRange: number

Defined in

components/StarsStatisticalModel.tsx:10


lowerQuartile

lowerQuartile: number

Defined in

components/StarsStatisticalModel.tsx:8


mean

mean: number

Defined in

components/StarsStatisticalModel.tsx:5


median

median: number

Defined in

components/StarsStatisticalModel.tsx:6


standardDeviation

standardDeviation: number

Defined in

components/StarsStatisticalModel.tsx:7


upperQuartile

upperQuartile: number

Defined in

components/StarsStatisticalModel.tsx:9

Methods

toJSONString

toJSONString(): string

Converts the StarsStatisticalModel instance to a JSON string.

Returns

string

A JSON string representing the instance.

Defined in

components/StarsStatisticalModel.tsx:43


fromJSONString

Static fromJSONString(jsonString): StarsStatisticalModel

Creates a new StarsStatisticalModel instance from a JSON string.

Parameters

NameTypeDescription
jsonStringstringA JSON string representing a StarsStatisticalModel instance.

Returns

StarsStatisticalModel

A new StarsStatisticalModel instance.

Defined in

components/StarsStatisticalModel.tsx:53