Skip to content

Commit

Permalink
Merge pull request #311 from Steinbeck-Lab/feat-charts
Browse files Browse the repository at this point in the history
fix: corrections to the titles
  • Loading branch information
CS76 authored Dec 10, 2024
2 parents 7861c27 + 0097c84 commit 467de00
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
11 changes: 11 additions & 0 deletions app/Livewire/PropertiesPlot.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ class PropertiesPlot extends Component

public $name;

public $name_corrections = [
'van_der_walls_volume' => 'Van der Waals volume <span style="font-family: \'Times New Roman\', serif;">
<span style="font-size: 20px;">(V<span style="font-size: 16px; position: relative; font-style: italic;">w</span>
)</span>
</span>',
'fractioncsp3' => 'Fraction Csp3',
'qed_drug_likeliness' => 'QED drug likeness',
'hydrogen_bond_acceptors_lipinski' => 'Hydrogen bond acceptors Lipinski',
'hydrogen_bond_donors_lipinski' => 'Hydrogen bond donors Lipinski',
];

public function mount($property, $name)
{
$this->property = $property;
Expand Down
12 changes: 8 additions & 4 deletions resources/views/livewire/density-plot.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<div>
<div>
<h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl mb-3.5">
NP-Likeliness
<h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl mb-1">
NP-Likeness
<span class=" text-sm ">
(<a class="text-sm text-blue-500 hover:text-blue-600" href="http://dx.doi.org/10.1021/ci700286x" target="_blank">DOI</a>)
</span>
</h2>
<div class="flex flex-col md:flex-row">

<div class="flex flex-col md:flex-row mt-3.5">
<div style="height: 550px;" class="w-full md:w-4/5 md:h-full">
<canvas id="myChart"></canvas>
</div>
Expand Down Expand Up @@ -150,4 +154,4 @@
}
</style>

</div>
</div>
2 changes: 1 addition & 1 deletion resources/views/livewire/properties-plot.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="w-full">
<div>
<h2 class="text-2xl font-bold tracking-tight text-gray-900 sm:text-3xl mb-3">
{{ ucfirst(str_replace('_', ' ', $name)) }}
{!! $name_corrections[$name] ?? ucfirst(str_replace('_', ' ', $name)) !!}
</h2>
<div class="flex flex-col">
<div style="height: 400px;" class="w-full">
Expand Down

0 comments on commit 467de00

Please sign in to comment.