Piwik\Plugins\CoreVisualizations\Visualizations\Cloud::getCloudValues PHP Method

getCloudValues() private method

private getCloudValues ( )
    private function getCloudValues()
    {
        $this->shuffleCloud();
        if (empty($this->wordsArray)) {
            return array();
        }
        $return = array();
        $maxValue = max($this->wordsArray);
        foreach ($this->wordsArray as $word => $popularity) {
            $wordTruncated = $this->truncateWordIfNeeded($word);
            $percent = $this->getPercentage($popularity, $maxValue);
            $sizeRange = $this->getClassFromPercent($percent);
            $return[$word] = array('word' => $word, 'wordTruncated' => $wordTruncated, 'value' => $popularity, 'size' => $sizeRange, 'percent' => $percent);
        }
        return $return;
    }