Skip to content

Commit

Permalink
polar axis
Browse files Browse the repository at this point in the history
  • Loading branch information
LogCreative committed Mar 3, 2021
1 parent c661bf5 commit 45a6603
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<option value="1">x对数轴</option>
<option value="2">y对数轴</option>
<option value="3">双对数轴</option>
<option value="4" v-show="enablepolar">极坐标轴</option>
</select>
</td>
</tr>
Expand Down Expand Up @@ -102,6 +103,7 @@
<lib category="selectcolormodel" chname="CMYK模式" libname="cmyk" customized="1"></lib>
<lib :id="4" category="pgfplots" chname="统计库" libname="statistics" customized="0"></lib>
<lib :id="5" category="pgfplots" chname="间隙填充库" libname="fillbetween" customized="0"></lib>
<lib :id="6" category="pgfplots" chname="极坐标库" libname="polar" customized="0"></lib>
</div>
</details>
<details id="data" open="true">
Expand Down Expand Up @@ -179,7 +181,7 @@

</div>
<template id="libtpl">
<td><input type="checkbox" v-model="enabled" @change="onlibchange">{{chname}}</input></td>
<div class="libchecker"><input type="checkbox" v-model="enabled" @change="onlibchange">{{chname}}</input></div>
</template>
<template id="parambartpl">
<div class="parambar" style="display: block;">
Expand Down
4 changes: 4 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -340,4 +340,8 @@ input[type=text]{
width: 20px;
height: 10px;
border: 1px solid black;
}

.libchecker {
display: inline-block;
}
10 changes: 10 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Vue.component('lib',{
else if (this.id==4)
for(var key in statisticsDic)
sparamDic[key] = statisticsDic[key];
else if (this.id==6)
app.enablepolar = true;
}
else{
delete app.packages[this.id];
Expand All @@ -48,6 +50,11 @@ Vue.component('lib',{
else if(this.id==4)
for(var key in statisticsDic)
delete sparamDic[key];
else if(this.id==6){
if(app.axistype=="4")
app.axistype = "0";
app.enablepolar = false;
}
}
updatePkg();
if(this.id)
Expand Down Expand Up @@ -661,6 +668,7 @@ var app = new Vue({
enableLegend: true,
enablepin: false,
enablesource: true,
enablepolar: false,
manual: false,
series: "",
param: "",
Expand Down Expand Up @@ -700,6 +708,8 @@ var app = new Vue({
case "1": axistypename = "semilogxaxis"; break;
case "2": axistypename = "semilogyaxis"; break;
case "3": axistypename = "loglogaxis"; break;
case "4": axistypename = "polaraxis";
break;
}
return (this.enablepin ? tp_premable : t_premable)
+ "\\begin{" + axistypename + "}["
Expand Down

0 comments on commit 45a6603

Please sign in to comment.