Skip to content

Commit dd8f84d

Browse files
author
minjk-bl
committed
Chart Setting app
1 parent 3580a04 commit dd8f84d

17 files changed

Lines changed: 371 additions & 49 deletions

css/boardFrame.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,13 @@
238238
.vp-block.apps.vp-focus-child .vp-block-header {
239239
background-color: rgb(253, 177, 133);
240240
}
241+
.vp-block.visualization .vp-block-header {
242+
background-color: rgb(249, 227, 214);
243+
}
244+
.vp-block.visualization.vp-focus .vp-block-header,
245+
.vp-block.visualization.vp-focus-child .vp-block-header {
246+
background-color: rgb(253, 177, 133);
247+
}
241248
.vp-block.machine_learning .vp-block-header {
242249
background-color: #E8ECD0;
243250
}

css/popupComponent.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,3 +402,36 @@
402402
text-align: center;
403403
cursor: pointer;
404404
}
405+
/* body top-bar */
406+
.vp-popup-body-top-bar {
407+
text-align: right;
408+
}
409+
.vp-popup-body-top-bar-item {
410+
margin-bottom: 5px;
411+
}
412+
.vp-popup-body-top-bar-item:hover {
413+
color: var(--font-hightlight);
414+
}
415+
.vp-popup-body-top-bar-item img {
416+
-moz-box-sizing: border-box;
417+
box-sizing: border-box;
418+
width: 22px; /* Width of new image */
419+
height: 22px; /* Height of new image */
420+
padding-left: 22px; /* Equal to width of new image */
421+
margin-bottom: 5px;
422+
}
423+
.vp-popup-body-top-bar-item[data-type="import"] img {
424+
background: url(../../visualpython/img/import.svg) no-repeat;
425+
}
426+
.vp-popup-body-top-bar-item[data-type="import"]:hover img {
427+
background: url(../../visualpython/img/import_activated.svg) no-repeat;
428+
}
429+
.vp-popup-body-top-bar-item[data-type="package"] {
430+
margin-left: 10px;
431+
}
432+
.vp-popup-body-top-bar-item[data-type="package"] img {
433+
background: url(../../visualpython/img/setting.svg) no-repeat;
434+
}
435+
.vp-popup-body-top-bar-item[data-type="package"]:hover img {
436+
background: url(../../visualpython/img/setting_activated.svg) no-repeat;
437+
}

data/libraries.json

Lines changed: 62 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,20 +3033,6 @@
30333033
"icon": "apps/apps_reshape.svg"
30343034
}
30353035
},
3036-
{
3037-
"id" : "apps_chart",
3038-
"type" : "function",
3039-
"level": 1,
3040-
"name" : "Chart",
3041-
"tag" : "CHART,APPS",
3042-
"path" : "visualpython - apps - chart",
3043-
"desc" : "Chart",
3044-
"file" : "m_apps/Chart",
3045-
"apps" : {
3046-
"color": 3,
3047-
"icon": "apps/apps_chart.svg"
3048-
}
3049-
},
30503036
{
30513037
"id" : "apps_markdown",
30523038
"type" : "function",
@@ -3071,7 +3057,7 @@
30713057
"desc" : "PDF",
30723058
"file" : "m_apps/PDF",
30733059
"apps" : {
3074-
"color": 4,
3060+
"color": 3,
30753061
"icon": "apps/apps_pymupdf.svg"
30763062
}
30773063
},
@@ -3088,18 +3074,72 @@
30883074
"color": 4,
30893075
"icon": "apps/apps_profiling.svg"
30903076
}
3077+
}
3078+
]
3079+
},
3080+
{
3081+
"id" : "pkg_visualize",
3082+
"type" : "package",
3083+
"level": 0,
3084+
"name" : "Visualization",
3085+
"path" : "visualpython - visualization",
3086+
"desc" : "Visualization modules",
3087+
"open" : true,
3088+
"grid" : true,
3089+
"item" : [
3090+
{
3091+
"id" : "visualize_setting",
3092+
"type" : "function",
3093+
"level": 1,
3094+
"name" : "Setting",
3095+
"tag" : "CHART SETTING,IMPORT CHART,VISUALIZATION,VISUALIZE",
3096+
"path" : "visualpython - visualization - chartsetting",
3097+
"desc" : "Chart setting",
3098+
"file" : "m_visualize/ChartSetting",
3099+
"apps" : {
3100+
"color": 1,
3101+
"icon": "apps/apps_chart.svg"
3102+
}
30913103
},
30923104
{
3093-
"id" : "apps_chartTest",
3105+
"id" : "visualize_chart",
30943106
"type" : "function",
30953107
"level": 1,
3096-
"name" : "Chart Test",
3097-
"tag" : "CHART TEST,APPS",
3098-
"path" : "visualpython - apps - charttest",
3099-
"desc" : "Chart Test",
3100-
"file" : "m_apps/ChartTest",
3108+
"name" : "Matplotlib",
3109+
"tag" : "MATPLOTLIB,CHART,VISUALIZATION,VISUALIZE",
3110+
"path" : "visualpython - visualization - matplotlib",
3111+
"desc" : "Matplotlib chart creation",
3112+
"file" : "m_apps/Chart",
31013113
"apps" : {
3102-
"color": 4,
3114+
"color": 1,
3115+
"icon": "apps/apps_chart.svg"
3116+
}
3117+
},
3118+
{
3119+
"id" : "pd_plot",
3120+
"type" : "function",
3121+
"level": 1,
3122+
"name" : "Pandas Plot",
3123+
"tag" : "PANDAS PLOT,PANDAS",
3124+
"path" : "visualpython - library - pandas - plot",
3125+
"desc" : "Pandas plot creation",
3126+
"file" : "m_library/m_pandas/plot",
3127+
"apps" : {
3128+
"color": 1,
3129+
"icon": "apps/apps_chart.svg"
3130+
}
3131+
},
3132+
{
3133+
"id" : "visualize_seaborn",
3134+
"type" : "function",
3135+
"level": 1,
3136+
"name" : "Seaborn",
3137+
"tag" : "SEABORN,CHART,VISUALIZATION,VISUALIZE",
3138+
"path" : "visualpython - visualization - seaborn",
3139+
"desc" : "Seaborn chart creation",
3140+
"file" : "m_visualize/Seaborn",
3141+
"apps" : {
3142+
"color": 1,
31033143
"icon": "apps/apps_chart.svg"
31043144
}
31053145
}
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,6 @@ define([
7070
{ name: 'allocateTo', label: 'Allocate To', component: ['input'], usePair: true }
7171
]
7272
},
73-
'ecdfplot': {
74-
name: 'Empirical Cumulative Distribution Plot',
75-
code: '${allocateTo} = sns.ecdfplot(${data}${x}${y}${hue}${etc})',
76-
description: 'Plot empirical cumulative distribution functions.',
77-
options: [
78-
{ name: 'data', component: ['var_select'], var_type: ['DataFrame', 'Series', 'list'], usePair: true },
79-
{ name: 'x', component: ['col_select'], usePair: true },
80-
{ name: 'y', component: ['col_select'], usePair: true },
81-
{ name: 'hue', component: ['col_select'], usePair: true },
82-
{ name: 'allocateTo', label: 'Allocate To', component: ['input'], usePair: true }
83-
]
84-
},
8573
'rugplot': {
8674
name: 'Rug Plot',
8775
code: '${allocateTo} = sns.rugplot(${data}${x}${y}${hue}${etc})',

html/m_visualize/chartSetting.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<body>
2+
<div class="vp-grid-border-box vp-grid-col-95">
3+
<label for="figureWidth" class="">Figure size</label>
4+
<div>
5+
<input type="number" id="figureWidth" class="vp-input m vp-state" placeholder="width" value="12">
6+
<input type="number" id="figureHeight" class="vp-input m vp-state" placeholder="height" value="8">
7+
</div>
8+
<label for="styleSheet" class="">Style sheet</label>
9+
<input type="text" class="vp-input vp-state" id="styleSheet" placeholder="style name" value="">
10+
<label for="fontName" class="">System font</label>
11+
<input type="text" class="vp-input vp-state" id="fontName" placeholder="font name" value="">
12+
<label for="fontSize" class="">Font size</label>
13+
<input type="number" id="fontSize" class="vp-input vp-state" placeholder="size" value="10">
14+
</div>
15+
</body>

html/popupComponent.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,21 @@
3333
<img class="vp-popup-toggle" src="/nbextensions/visualpython/img/minimize.svg" title="Minimize this popup">
3434
<img class="vp-popup-close" src="/nbextensions/visualpython/img/close_big.svg" title="Close popup"/>
3535
</div>
36-
<div class="vp-popup-body vp-scrollbar">
36+
<div class="vp-popup-body">
37+
<div class="vp-popup-body-top-bar vp-italic vp-gray-text vp-no-selection vp-cursor">
38+
<span id="popupImport" class="vp-popup-body-top-bar-item" data-type="import">
39+
Import Library
40+
<img src="/nbextensions/visualpython/img/import.svg"/>
41+
</span>
42+
<span id="popupPackage" class="vp-popup-body-top-bar-item" data-type="package">
43+
Package Manager
44+
<img src="/nbextensions/visualpython/img/setting.svg"/>
45+
</span>
46+
</div>
3747
<!-- Body -->
48+
<div class="vp-popup-content vp-scrollbar">
49+
50+
</div>
3851
</div>
3952
<div class="vp-popup-footer">
4053
<!-- Footer -->

img/import.svg

Lines changed: 7 additions & 0 deletions
Loading

img/import_activated.svg

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)