mirror of
https://github.com/plausible/analytics.git
synced 2024-11-23 20:13:31 +03:00
Show real counts along percentages (#293)
This commit is contained in:
parent
01ef17abb0
commit
a7f3aa430e
@ -64,11 +64,11 @@ class ScreenSizes extends React.Component {
|
||||
renderScreenSize(size) {
|
||||
return (
|
||||
<div className="flex items-center justify-between my-1 text-sm" key={size.name}>
|
||||
<div className="w-full h-8" style={{maxWidth: 'calc(100% - 4rem)'}}>
|
||||
<div className="w-full h-8" style={{maxWidth: 'calc(100% - 6rem)'}}>
|
||||
<Bar count={size.count} all={this.state.sizes} bg="bg-green-50" />
|
||||
<span tooltip={EXPLANATION[size.name]} className="block px-2" style={{marginTop: '-26px'}}>{iconFor(size.name)} {size.name}</span>
|
||||
</div>
|
||||
<span className="font-medium">{size.percentage}%</span>
|
||||
<span className="font-medium">{size.count} <span className="inline-block text-xs w-8 text-right">({size.percentage}%)</span></span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -131,11 +131,11 @@ class Browsers extends React.Component {
|
||||
renderBrowser(browser) {
|
||||
return (
|
||||
<div className="flex items-center justify-between my-1 text-sm" key={browser.name}>
|
||||
<div className="w-full h-8" style={{maxWidth: 'calc(100% - 4rem)'}}>
|
||||
<div className="w-full h-8" style={{maxWidth: 'calc(100% - 6rem)'}}>
|
||||
<Bar count={browser.count} all={this.state.browsers} bg="bg-green-50" />
|
||||
<span className="block px-2" style={{marginTop: '-26px'}}>{browser.name}</span>
|
||||
</div>
|
||||
<span className="font-medium">{browser.percentage}%</span>
|
||||
<span className="font-medium">{browser.count} <span className="inline-block text-xs w-8 text-right">({browser.percentage}%)</span></span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -198,11 +198,11 @@ class OperatingSystems extends React.Component {
|
||||
renderOperatingSystem(os) {
|
||||
return (
|
||||
<div className="flex items-center justify-between my-1 text-sm" key={os.name}>
|
||||
<div className="w-full h-8" style={{maxWidth: 'calc(100% - 4rem)'}}>
|
||||
<div className="w-full h-8" style={{maxWidth: 'calc(100% - 6rem)'}}>
|
||||
<Bar count={os.count} all={this.state.operatingSystems} bg="bg-green-50" />
|
||||
<span className="block px-2" style={{marginTop: '-26px'}}>{os.name}</span>
|
||||
</div>
|
||||
<span className="font-medium">{os.percentage}%</span>
|
||||
<span className="font-medium">{os.count} <span className="inline-block text-xs w-8 text-right">({os.percentage}%)</span></span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -25,7 +25,9 @@ class CountriesModal extends React.Component {
|
||||
return (
|
||||
<tr className="text-sm" key={country.name}>
|
||||
<td className="p-2">{country.full_country_name}</td>
|
||||
<td className="p-2 w-32 font-medium" align="right">{numberFormatter(country.percentage)}%</td>
|
||||
<td className="p-2 w-32 font-medium" align="right">
|
||||
{country.count} <span className="inline-block text-xs w-8 text-right">({country.percentage}%)</span>
|
||||
</td>
|
||||
</tr>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user