小编Zur*_*uri的帖子

Chartjs雷达索引标签

我正在使用chartjs绘制雷达图.

该值在图表的点上悬停显示,但我想始终显示该值.我需要更改视图以在打印页面时显示数据.

这是我目前的图表.标签显示在悬停上

这是我目前的图表. 标签显示在悬停上

我想始终显示值,如下图所示 我想始终显示值,如下图所示

javascript css jquery radar-chart chart.js

8
推荐指数
1
解决办法
1418
查看次数

Thymeleaf 在对象上的列表中多选

Thymeleaf 在对象上的列表中多选

我正在使用 Thymeleaf 和 Spring MVC,我想做这样的多重选择:

<form action="#" th:object="${promotion}" th:action="@{/promotion/add}" method="post">

<select th:field="*{products.id}" th:value="*{products.id}"  multiple="multiple" >
  <optgroup th:each="c : ${categories}" th:label="${c.name}">   
     <option th:each="p : ${c.products}" th:value="${p.id}" th:text="${p.name}" />
  </optgroup>
</select>
</form>
Run Code Online (Sandbox Code Playgroud)

我有这个对象的形式

public class Promotion implements Serializable{
    private static final long serialVersionUID = 1L;
    private int id;
    private String name;
    private List<PromoProduct> products;
}

public class PromoProduct implements Serializable {
    private static final long serialVersionUID = 1L;
    private int id;
    private List<Integer> products;
    private int amount;
}
Run Code Online (Sandbox Code Playgroud)

使用此代码,我收到以下错误消息:

org.springframework.web.util.NestedServletException: …
Run Code Online (Sandbox Code Playgroud)

java select list spring-mvc thymeleaf

5
推荐指数
1
解决办法
7359
查看次数

标签 统计

chart.js ×1

css ×1

java ×1

javascript ×1

jquery ×1

list ×1

radar-chart ×1

select ×1

spring-mvc ×1

thymeleaf ×1