Skip to content

Commit 4efc7ad

Browse files
feat: [CCM-28203]: Switch from Area Chart to Line Chart (#168)
* feat: [CCM-28203]: Switch from Area Chart to Line Chart * feat: [CCM-28203]: Update Label for Last 30 Days
1 parent 121976d commit 4efc7ad

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@harnessio/backstage-plugin-harness-srm": "^0.2.0",
4545
"@harnessio/backstage-plugin-harness-chaos": "^0.2.0",
4646
"@harnessio/backstage-plugin-harness-iacm": "0.3.0",
47-
"@harnessio/backstage-plugin-harness-ccm": "^0.1.0",
47+
"@harnessio/backstage-plugin-harness-ccm": "^0.1.3",
4848
"@harnessio/backstage-plugin-fme-feature-flags": "^0.2.0",
4949
"@material-ui/core": "^4.12.2",
5050
"@material-ui/icons": "^4.9.1",

plugins/harness-ccm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@harnessio/backstage-plugin-harness-ccm",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"main": "src/index.ts",
55
"types": "src/index.ts",
66
"license": "Apache-2.0",

plugins/harness-ccm/src/components/PerspectivesChart/PerspectivesChart.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
Tooltip,
99
Legend,
1010
ResponsiveContainer,
11-
AreaChart,
12-
Area,
11+
LineChart,
12+
Line,
1313
} from 'recharts';
1414
import { CircularProgress, makeStyles } from '@material-ui/core';
1515
import { TimeSeriesDataPoints, ViewVisualization } from '../../api/types';
@@ -117,7 +117,7 @@ const PerspectivesChart: React.FC<PerspectivesChartProps> = ({
117117
))}
118118
</BarChart>
119119
) : (
120-
<AreaChart
120+
<LineChart
121121
width={730}
122122
height={250}
123123
data={formattedData}
@@ -129,18 +129,19 @@ const PerspectivesChart: React.FC<PerspectivesChartProps> = ({
129129
<Tooltip formatter={tickFormatter} />
130130
<Legend />
131131
{keys.map((key, idx) => (
132-
<Area
132+
<Line
133133
type="monotone"
134134
key={key}
135135
dataKey={key}
136-
fill={
136+
stroke={
137137
key === 'Others'
138138
? OTHERS_COLOR_HEX
139139
: CE_COLOR_CONST_NEW[idx % CE_COLOR_CONST_NEW.length]
140140
}
141+
strokeWidth={2}
141142
/>
142143
))}
143-
</AreaChart>
144+
</LineChart>
144145
)}
145146
</ResponsiveContainer>
146147
</div>

plugins/harness-ccm/src/utils/PerpsectiveUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ const LAST_7_DAYS = {
221221
const LAST_30_DAYS = {
222222
label: DATE_RANGE_SHORTCUTS_NAME.LAST_30_DAYS,
223223
dateRange: DATE_RANGE_SHORTCUTS.LAST_30_DAYS,
224-
dateFormat: ['MMM YYYY'],
224+
dateFormat: ['MMM D', 'MMM D'],
225225
};
226226

227227
const CURRENT_MONTH = {

0 commit comments

Comments
 (0)