我已经尝试了两天找到一种方法来设置在Highcharts上yAxis 的最大值.
我有一个百分比列图形,但系列中的最高值是60,所以它将轴调整到顶部70,我找到了一种方法来选择起点,但无法选择终点.
我真正需要的是将yAxis从0设置为100,因此数据将更准确地被视为百分比
在此先感谢Bruno WG
我陷入困境,因为我有一个有三个变量的对象书
String title
int Year
String authorName
Run Code Online (Sandbox Code Playgroud)
我必须按升序或降序中的一个,两个或所有三个变量对书进行排序,我实现了标题排序,但当人们选择多个变量进行排序时,我不知道该做什么.
这是我的一些代码:
书类:
import java.util.ArrayList;
public class Book{
String title;
String authorName;
int editionYear;
public Book(String title, String authorName, int editionYear){
this.title = title;
this.authorName = authorName;
this.editionYear = editionYear;
}
public String getBookInfo(){
ArrayList bookInfo = new ArrayList();
bookInfo.add(this.title);
bookInfo.add(this.authorName);
bookInfo.add(this.editionYear);
return bookInfo.toString();
}
}
Run Code Online (Sandbox Code Playgroud)
BookSorter类:
import java.util.Arrays;
import java.util.Comparator;
public class BookSorter{
private String sortkey;
private String order;
Book[] Books;
public BookSorter(Book Book1, Book Book2, Book Book3, Book Book4){
this.Books = …Run Code Online (Sandbox Code Playgroud)