changed scrobble line chart to bar, moved current track to lookup

This commit is contained in:
aj 2019-05-01 14:04:18 +01:00
parent fe0d8d2dbf
commit e4ebf5a20b
3 changed files with 7 additions and 7 deletions

View File

@ -11,7 +11,7 @@ import javafx.fxml.FXML;
import sarsoo.fmframework.fm.FmUserNetwork;
import sarsoo.fmframework.music.Album;
import sarsoo.fmframework.net.Key;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.BarChart;
import javafx.scene.chart.XYChart;
import javafx.scene.control.*;
import javafx.scene.layout.BorderPane;
@ -28,7 +28,7 @@ public class ScrobbleChartPaneController {
private ChoiceBox<String> dropDownTimeRange;
@FXML
private LineChart lineChartScrobbles;
private BarChart barChartScrobbles;
@FXML
private BorderPane chartBorderPane;
@ -95,8 +95,8 @@ public class ScrobbleChartPaneController {
@Override
public void run() {
try {
lineChartScrobbles.getData().clear();
lineChartScrobbles.getData().add(series);
barChartScrobbles.getData().clear();
barChartScrobbles.getData().add(series);
} finally {
latch.countDown();

View File

@ -20,14 +20,14 @@
</ToolBar>
</bottom>
<center>
<LineChart fx:id="lineChartScrobbles" legendVisible="false" BorderPane.alignment="CENTER">
<BarChart fx:id="barChartScrobbles" legendVisible="false" BorderPane.alignment="CENTER">
<xAxis>
<CategoryAxis side="BOTTOM" />
</xAxis>
<yAxis>
<NumberAxis side="LEFT" />
</yAxis>
</LineChart>
</BarChart>
</center>
</BorderPane>
</children>

View File

@ -18,6 +18,7 @@
</Menu>
<Menu fx:id="menuLookup" mnemonicParsing="false" text="lookup">
<items>
<MenuItem fx:id="menuItemCurrentTrack" mnemonicParsing="false" onAction="#handleCurrentTrack" text="current track" />
<MenuItem fx:id="menuItemTrack" mnemonicParsing="false" onAction="#handleLookupTrack" text="track" />
<MenuItem fx:id="menuItemAlbum" mnemonicParsing="false" onAction="#handleLookupAlbum" text="album" />
<MenuItem fx:id="menuItemArtist" mnemonicParsing="false" onAction="#handleLookupArtist" text="artist" />
@ -33,7 +34,6 @@
<Menu fx:id="menuUtil" mnemonicParsing="false" text="util">
<items>
<MenuItem fx:id="menuItemScrobble" mnemonicParsing="false" onAction="#handleScrobble" text="scrobble" />
<MenuItem fx:id="menuItemCurrentTrack" mnemonicParsing="false" onAction="#handleCurrentTrack" text="current track" />
<MenuItem fx:id="menuItemOpenConsole" mnemonicParsing="false" onAction="#handleOpenConsole" text="open console" />
<MenuItem mnemonicParsing="false" onAction="#handleChangeUsername" text="set username" />
</items>