Skip to content

Commit

Permalink
Merge pull request #322 from Steinbeck-Lab/feat-charts
Browse files Browse the repository at this point in the history
Chart updates
  • Loading branch information
CS76 authored Dec 16, 2024
2 parents 114503e + 3e1958d commit c2cb39b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/Console/Commands/GenerateBubbleFrequencyCharts.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ public function handle()
$query1 .= 'GROUP BY 1';
$query2 .= 'GROUP BY 1';

$bubbleFrequencyPlotData[$first_column.'|'.$second_column.'|'.uniqid()] = DB::select("
$bubbleFrequencyPlotData[$first_column.'|'.$first_column.'|'.uniqid()] = DB::select("
WITH
t1 as ($query1)
SELECT t1.col column_values, t1.count first_column_count from t1 order by 2 desc limit 170;
");

$bubbleFrequencyPlotData[$first_column.'|'.$second_column.'|'.uniqid()] = DB::select("
$bubbleFrequencyPlotData[$second_column.'|'.$second_column.'|'.uniqid()] = DB::select("
WITH
t1 as ($query2)
SELECT t1.col column_values, t1.count second_column_count from t1 order by 2 desc limit 170;
Expand Down
5 changes: 5 additions & 0 deletions app/Livewire/BubbleFrequencyPlot.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ class BubbleFrequencyPlot extends Component
'chemical_class' => 'ClassyFire\'s Chemical Classes <a href="https://jcheminf.biomedcentral.com/articles/10.1186/s13321-016-0174-y" target="_blank" rel="noopener noreferrer"><svg class="inline-block w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"/></svg></a>',
];

public $search_names = [
'np_classifier_class' => 'np_class',
'chemical_class' => 'class',
];

public function mount($chartName, $chartData)
{
// Extract column names
Expand Down
Loading

0 comments on commit c2cb39b

Please sign in to comment.