未验证 提交 9e693836 编写于 作者: P Peter Pan 提交者: GitHub

frontend 2.0.0-beta.22: disable smooth by chart, hide step axis label, hide legend (#601)

* fix: disable smooth by chart, hide step axis label, hide legend

* v2.0.0-beta.22
上级 82bcbc83
...@@ -78,8 +78,9 @@ const ScalarChart: FunctionComponent<ScalarChartProps> = ({ ...@@ -78,8 +78,9 @@ const ScalarChart: FunctionComponent<ScalarChartProps> = ({
(...urls) => cycleFetcher(urls) (...urls) => cycleFetcher(urls)
); );
const type = xAxis === 'wall' ? 'time' : 'value'; const smooth = false;
const smooth = xAxis !== 'wall'; const type = useMemo(() => (xAxis === 'wall' ? 'time' : 'value'), [xAxis]);
const xAxisLabel = useMemo(() => (xAxis === 'step' ? '' : t(`x-axis-value.${xAxis}`)), [xAxis, t]);
const transformParams = useMemo( const transformParams = useMemo(
() => ({ () => ({
...@@ -154,8 +155,7 @@ const ScalarChart: FunctionComponent<ScalarChartProps> = ({ ...@@ -154,8 +155,7 @@ const ScalarChart: FunctionComponent<ScalarChartProps> = ({
return ( return (
<StyledLineChart <StyledLineChart
title={tag} title={tag}
legend={runs} xAxis={xAxisLabel}
xAxis={t(`x-axis-value.${xAxis}`)}
yRange={yRange} yRange={yRange}
type={type} type={type}
tooltip={formatter} tooltip={formatter}
......
{ {
"name": "visualdl", "name": "visualdl",
"version": "2.0.0-beta.20", "version": "2.0.0-beta.22",
"title": "VisualDL", "title": "VisualDL",
"description": "A platform to visualize the deep learning process and result.", "description": "A platform to visualize the deep learning process and result.",
"keywords": [ "keywords": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册