- )
-
- }
+ )}
);
}
diff --git a/src/app/components/History.tsx b/src/app/components/History.tsx
index ff2c15cf9..2e6c45930 100644
--- a/src/app/components/History.tsx
+++ b/src/app/components/History.tsx
@@ -108,8 +108,13 @@ function History(props) {
.enter()
.append('g')
.style('fill', function (d) {
- let loadTime =
- d.data.stateSnapshot.children[0].componentData.actualDuration;
+ let loadTime;
+ if (d.data.stateSnapshot.children[0].componentData.actualDuration){
+ loadTime = d.data.stateSnapshot.children[0].componentData.actualDuration;
+ } else{
+ loadTime = 1;
+ }
+
if (loadTime !== undefined) {
if (loadTime > 16) {
diff --git a/src/app/components/PerfView.tsx b/src/app/components/PerfView.tsx
index 3d1915730..c8a56c5ab 100644
--- a/src/app/components/PerfView.tsx
+++ b/src/app/components/PerfView.tsx
@@ -56,12 +56,6 @@ const PerfView = (props: PerfViewProps) => {
'#c6e6ff',
]);
- // Alternate color scaling function
- // const colorScale = d3.scaleLinear()
- // .domain([0, 7])
- // .range(['hsl(200,60%,60%)', 'hsl(255,30%,40%)'])
- // .interpolate(d3.interpolateHcl);
-
// Set up circle-packing layout function
const packFunc = useCallback(
(data: object) => {
diff --git a/src/app/components/StateRoute.tsx b/src/app/components/StateRoute.tsx
index d158f46f9..8c89ba79b 100644
--- a/src/app/components/StateRoute.tsx
+++ b/src/app/components/StateRoute.tsx
@@ -20,7 +20,8 @@ const History = require('./History').default;
const ErrorHandler = require('./ErrorHandler').default;
-const NO_STATE_MSG = 'No state change detected. Trigger an event to change state';
+const NO_STATE_MSG =
+ 'No state change detected. Trigger an event to change state';
// eslint-disable-next-line react/prop-types
interface StateRouteProps {
@@ -53,7 +54,16 @@ const StateRoute = (props: StateRouteProps) => {
// Map
const renderComponentMap = () => {
if (hierarchy) {
- return ;
+ return (
+
+ );
}
return
{NO_STATE_MSG}
;
};
@@ -62,13 +72,15 @@ const StateRoute = (props: StateRouteProps) => {
// when the page is refreshed we may not have a hierarchy, so we need to check if hierarchy was initialized
// if true involk render chart with hierarchy
const renderHistory = () => {
- if (hierarchy.children.length > 0) {
+ if (hierarchy) {
return ;
}
- return
History graph will render on first state change
;
+ return
{NO_STATE_MSG}
;
};
- const renderAtomsRelationship = () => ;
+ const renderAtomsRelationship = () => (
+
+ );
// the hierarchy gets set on the first click in the page
// when the page is refreshed we may not have a hierarchy, so we need to check if hierarchy was initialized
@@ -80,17 +92,20 @@ const StateRoute = (props: StateRouteProps) => {
return