完善教育

This commit is contained in:
李鹏宇
2026-08-11 19:00:23 +08:00
parent e9d206a4ab
commit fdfc50bc71
6 changed files with 46 additions and 0 deletions
@@ -439,6 +439,11 @@ export class Ksdashboardgraph extends Component{
if(graph_render){
var root = am5.Root.new(graph_render[0]);
// 夜间模式下统一把 amCharts 默认文字色改为浅色,
// 否则坐标轴/数据标签在深色卡片上看不清。
if (document.body.classList.contains('ks_body_class')) {
root.interfaceColors.set("text", am5.color(0xf1f5f9));
}
}
const theme = item.ks_chart_item_color
@@ -1426,6 +1431,9 @@ export class Ksdashboardgraph extends Component{
data.push({"stage":keyValueArray[i][0],"applicants":keyValueArray[i][1]})
}
var root = am5.Root.new(funnelRender[0]);
if (document.body.classList.contains('ks_body_class')) {
root.interfaceColors.set("text", am5.color(0xf1f5f9));
}
const theme = item.ks_chart_item_color
switch(theme){
case "default":
@@ -2216,6 +2224,9 @@ export class Ksdashboardgraph extends Component{
}
}
const root = am5.Root.new(mapRender[0]);
if (document.body.classList.contains('ks_body_class')) {
root.interfaceColors.set("text", am5.color(0xf1f5f9));
}
root.setThemes([am5themes_Animated.new(root)]);
// Create the map chart
@@ -148,6 +148,29 @@
border-color: #334155 !important;
}
// ============================================================
// 图表内部文字/数字夜间统一改浅色
// amCharts 5 渲染的坐标轴标签、数据标签、图例等默认是黑色 fill,
// 在深色卡片背景上看不清,统一改成 #f1f5f9。
// ============================================================
.ks_body_class .ks_dashboarditem_chart_container {
// 图表标题
.ks_chart_heading {
color: #f1f5f9 !important;
}
// amCharts SVG 内所有 text:坐标轴、刻度、柱顶数字、饼图标签等
svg text {
fill: #f1f5f9 !important;
}
// amCharts 用 HTML 层渲染的 tooltip / 图例文字
.am5-html,
.am5-html * {
color: #f1f5f9 !important;
}
}
// ============================================================
// 瓦片/图表卡片右上角操作按钮(复制/编辑/信息/更多)
// 夜间模式下这些按钮容易出现重叠、背景刺眼、图标看不清的问题。
@@ -102,6 +102,9 @@ export class ks_bullet_chart extends Component{
}
this.root = am5.Root.new(bulletRefEl);
if (document.body.classList.contains('ks_body_class')) {
this.root.interfaceColors.set("text", am5.color(0xf1f5f9));
}
var theme = this.props.record.data.ks_chart_item_color;
switch (theme) {
@@ -88,6 +88,9 @@ export class ks_funnel_chart extends Component{
data.push({"stage":keyValueArray[i][0],"applicants":keyValueArray[i][1]})
}
this.root = am5.Root.new(this.funnelRef.el);
if (document.body.classList.contains('ks_body_class')) {
this.root.interfaceColors.set("text", am5.color(0xf1f5f9));
}
const theme = this.props.record.data.ks_chart_item_color
switch(theme){
@@ -126,6 +126,9 @@ export class KsGraphPreview extends Component{
this.root = am5.Root.new(this.graphref.el);
if (document.body.classList.contains('ks_body_class')) {
this.root.interfaceColors.set("text", am5.color(0xf1f5f9));
}
var self =this;
const theme = this.props.record.data.ks_chart_item_color
@@ -135,6 +135,9 @@ export class KsMapPreview extends Component {
}
this.root = am5.Root.new(this.mapContainerRef.el);
if (document.body.classList.contains('ks_body_class')) {
this.root.interfaceColors.set("text", am5.color(0xf1f5f9));
}
// Set themes
this.root.setThemes([am5themes_Animated.new(this.root)]);