Код текстовой области:-< /p>
Код: Выделить всё
this is a script of a text area
.switch {
position: relative;
display: inline-block;
width: 70px;
height: 34px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0; left: 0; right: 0; bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: Black;
transition: .4s;
border-radius: 50%;
}
input:checked + .slider {
background-color: #f44336;
}
input:checked + .slider:before {
transform: translateX(36px);
}
.label-text {
font-family: Arial;
font-size: 14px;
margin: 0 10px;
}
.toggle-container {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 10px;
}
Top 15
Bottom 15
Top
Bottom
document.getElementById("rankToggle").addEventListener("change", function() {
if (this.checked) {
document.getElementById("14d7f5c3deed4295af212cfacba2479d").click();
} else {
document.getElementById("0205d8e5efe047d5b9b8e885f864704f").click();
}
});
On barchart, we have Styles on x axis and Sum([TY Net Sales$]) on Y axis.
Data limit using expression of bar chart is
${TimeToggle} and If(
Not ${RankSelectionToggleN},
[SalesRank] = (Max([SalesRank]) - 15 + 1)
)
SaleRank:- DenseRank(Sum(If(${TimeToggle},[TY Net Sales$],NULL)) Over ([Style]),"desc")
IronPython Script for Top 15:- Document.Properties["RankSelectionToggleN"] = False
IronPython Script for Bottom 15:- Document.Properties["RankSelectionToggleN"] = True
Подробнее здесь: https://stackoverflow.com/questions/796 ... erent-page