Module output - WoWAnalyzer/WoWAnalyzer GitHub Wiki
Modules can have one or more of the following types out output:
Using the suggestions(when)
method you can add one or more suggestions. Suggestions are displayed on the overview tab below the checklist. These suggestions are triggered based on the configured thresholds.
See this page for more information on suggestions: https://github.com/WoWAnalyzer/WoWAnalyzer/wiki/Meta:-Suggestions
Example code
get uptimeSuggestionThresholds() {
return {
actual: this.uptime,
isLessThan: {
minor: 0.25,
average: 0.2,
major: 0.1,
},
style: 'percentage',
};
}
suggestions(when) {
when(this.uptimeSuggestionThresholds).addSuggestion((suggest, actual, recommended) => {
return suggest(
<Trans>
Your <SpellLink id={SPELLS.RULE_OF_LAW_TALENT.id} /> uptime can be improved. Try keeping at least 1 charge on cooldown; you should (almost) never be at max charges.
</Trans>
)
.icon(SPELLS.RULE_OF_LAW_TALENT.icon)
.actual(<Trans>{formatPercentage(actual)}% uptime</Trans>)
.recommended(<Trans>>${formatPercentage(recommended)}% is recommended</Trans>);
});
}
Statistics are viewable on the statistics tabs. They come in various different sizes and layouts. Look at existing modules for examples.
See this page for more on statistic boxes: https://github.com/WoWAnalyzer/WoWAnalyzer/wiki/Statistic-boxes
Example code
statistic() {
const history = this.selectedCombatant.getBuffHistory(SPELLS.RULE_OF_LAW_TALENT.id);
return (
<StatisticBar
position={STATISTIC_ORDER.CORE(31)}
wide
size="small"
>
<div className="flex">
<div className="flex-sub icon">
<SpellIcon id={SPELLS.RULE_OF_LAW_TALENT.id} />
</div>
<div className="flex-sub value">
<Trans>
{formatPercentage(this.uptime, 0)}% <small>uptime</small>
</Trans>
</div>
<div className="flex-main chart" style={{ padding: 15 }}>
<UptimeBar
uptimeHistory={history}
start={this.owner.fight.start_time}
end={this.owner.fight.end_time}
style={{ height: '100%' }}
/>
</div>
</div>
</StatisticBar>
);
}
Tabs are special types of statistics. See the code example below.
Example code
statistic() {
return (
<Panel
title={<Trans>Beacon healing sources</Trans>}
explanation={(
<Trans>
Beacon healing is triggered by the <b>raw</b> healing done of your primary spells. This breakdown shows the amount of effective beacon healing replicated by each beacon transfering heal.
</Trans>
)}
position={120}
pad={false}
>
<BeaconHealingBreakdown
totalHealingDone={this.healingDone.total}
totalBeaconHealing={this._totalBeaconHealing}
beaconHealingBySource={this._beaconHealingBySource}
fightDuration={this.owner.fightDuration}
/>
</Panel>
);
}
Some modules only serve as helpers to other modules. These may have no output at all.