Skip to content

Commit

Permalink
fixed right panel width in plot-div, improved tutorial pages
Browse files Browse the repository at this point in the history
  • Loading branch information
rizac committed Nov 21, 2024
1 parent a519d4b commit 1a7436a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
9 changes: 5 additions & 4 deletions static/js/vue/plots-div.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ EGSIM.component('plots-div', {
</div>
</div>
<!-- RIGHT TOOLBAR (legend, buttons, controls) -->
<div class='d-flex flex-column ps-4 gap-3'>
<div class='d-flex flex-column ps-4 gap-3' style='width:21vw !important'>
<div class="btn-group">
<button v-if="closeButton" type='button' class='btn btn-primary border-0 text-nowrap'
@click="show = !show" title='close plots panel'>
Expand All @@ -217,16 +217,17 @@ EGSIM.component('plots-div', {
<div class='d-flex flex-column gap-2'>
<div
v-for="[legendgroup, legendObj] in Array.from(legend.entries()).filter(e => e[1].visible).concat(Array.from(legend.entries()).filter(e => !e[1].visible))"
:style="legendObj.visible ? '' : {'visibility': 'hidden'}"
class='d-flex flex-column p-2 border bg-white gap-2'
:class="legendObj.visible ? 'd-flex' : 'd-none'"
class='flex-column p-2 border bg-white gap-2'
>
<div class='d-flex align-items-baseline gap-2 text-nowrap' :style="{color: legendObj.mainColor}">
<input type='checkbox' title="Toggle plot trace(s) visibility"
v-if="plots.some(p => p.data.length > 1)"
v-model="legendObj.traceStyle.visible"
@change="setTraceStyle(legendgroup, {visible: legendObj.traceStyle.visible})"
:style="{'accent-color': legendObj.mainColor + ' !important'}" />
<span style='flex: 1 1 auto'>{{ legendgroup }}</span>
<span style='flex: 1 1 auto; overflow:hidden; text-overflow:ellipsis'
:title="legendgroup">{{ legendgroup }}</span>
<button type='button' title="Style plot trace(s)" class='btn btn-sm border-0 py-0 pe-1'
@click="legendObj.expanded=!legendObj.expanded;"
:style="{'color': legendObj.mainColor + ' !important'}">
Expand Down
39 changes: 20 additions & 19 deletions templates/downloaded-data-tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
strings of text. This has two potential problems: bigger file sizes and slower download,
and information loss (you write numbers e.g., [5, NaN] and read strings ['5', 'NaN']).
Most likely, data downloaded from eGSIM is safe, but we cannot guarantee it.
If you want to work with CSV files, we suggest to have a look at `read_csv` documentation
If you want to work with CSV files, we suggest to have a look at panda's `read_csv` documentation
(link provided in this page) and check your dataframe after opening.
</i>
</details>
Expand Down Expand Up @@ -141,27 +141,28 @@
</div>

<div>
Useful links
Useful pandas library links
<ul>
<li><a href="https://pandas.pydata.org/docs/user_guide/10min.html">
<i class='fa fa-external-link'></i>pandas short intro
<li><a target="_blank" href="https://pandas.pydata.org/docs/user_guide/10min.html">
<i class='fa fa-external-link me-1'></i>pandas short intro
</a></li>
<li><a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_hdf.html"
target="_blank"><i class='fa fa-external-link'></i>Read HDF</a></li>
<li><a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_hdf.html"
target="_blank"><i class='fa fa-external-link'></i>Write HDF</a></li>
<li><a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html"
target="_blank"><i class='fa fa-external-link'></i>Read CSV</a></li>
<li><a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html"
target="_blank"><i class='fa fa-external-link'></i>Write CSV</a></li>
<li><a href="https://pandas.pydata.org/docs/user_guide/indexing.html">
<i class='fa fa-external-link'></i>indexing and selecting data
<li><a target="_blank" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_hdf.html">
<i class='fa fa-external-link me-1'></i>Read HDF</a>
</li>
<li><a target="_blank" href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_hdf.html">
<i class='fa fa-external-link me-1'></i>Write HDF</a>
</li>
<li><a target="_blank" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html">
<i class='fa fa-external-link me-1'></i>Read CSV</a>
</li>
<li><a target="_blank" href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html">
<i class='fa fa-external-link me-1'></i>Write CSV</a>
</li>
<li><a target="_blank" href="https://pandas.pydata.org/docs/user_guide/indexing.html">
<i class='fa fa-external-link me-1'></i>indexing and selecting data
</a></li>
<!--<li><a href="https://pandas.pydata.org/docs/user_guide/advanced.html">
<i class='fa fa-external-link'></i>indexing and selecting data (multi-index - i.e. multi-level - row or column)</a></li>
-->
<li><a href="https://pandas.pydata.org/docs/user_guide/visualization.html#visualization">
<i class='fa fa-external-link'></i>plot with pandas
<li><a target="_blank" href="https://pandas.pydata.org/docs/user_guide/visualization.html#visualization">
<i class='fa fa-external-link me-1'></i>plot with pandas
</a></li>
</ul>
</div>
Expand Down

0 comments on commit 1a7436a

Please sign in to comment.