Skip to content

Commit

Permalink
fix: fix initParamsValidationRules
Browse files Browse the repository at this point in the history
  • Loading branch information
ElisavetAmpatzidou committed Jun 27, 2022
1 parent 45ce0fc commit f0a6bf1
Show file tree
Hide file tree
Showing 5 changed files with 335 additions and 70 deletions.
8 changes: 5 additions & 3 deletions clip/clip.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
--primary:{{ initParams.styles.primary }};
--secondary:{{ initParams.styles.secondary }};
--accent:{{ initParams.styles.accent }};
--fontFamily:{{initParams.styles.font}}
}

.root {
Expand Down Expand Up @@ -410,11 +409,14 @@
width: 90%;
position: absolute;
display: flex;
flex-direction: column;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
left: 8%;
top:8%;
height: 60%;
height: 40%;
gap: 10%;
}

.competitor-approach-list-root{
Expand Down
3 changes: 2 additions & 1 deletion clip/clip.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
opacity1,
} from "./incidents";
import { initParams } from "./initParams";
import initParamsValidationRules from "./initParamsValidationRules";

export const clip = new HTMLClip({
html,
Expand Down Expand Up @@ -151,7 +152,7 @@ clip.addIncident(
widthMove("6%", ".traction > .lt,.traction > .rb", 700),
22900
);
clip.addIncident(lineGraph,22900)
clip.addIncident(lineGraph(initParams[0].value.traction.graphData),22900)

//remove traction slide
clip.addIncident(
Expand Down
49 changes: 2 additions & 47 deletions clip/incidents.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,55 +193,10 @@ export const riple = (
}
);
};
export const lineGraph =
export const lineGraph = (graphdata)=>
new Graph.LineGraph(
{
data: {
"title": "",
"maxValue": 40,
"hover": false,
"showGrid":false,
"dataSets": [
{
"title": "PhaseA",
"color": "#ff1f4c"
},
{
"title": "PhaseB",
"color": "#ff82ad"
}
],
"data": [
{
"name": "Id1",
"values": [10, 18]
},
{
"name": "Id2",
"values": [15, 27]
},
{
"name": "Id3",
"values": [29, 23]
},
{
"name": "Id4",
"values": [31, 35]
},
{
"name": "Id5",
"values": [29, 23]
},
{
"name": "Id6",
"values": [15, 27]
},
{
"name": "Id7",
"values": [10, 18]
}
]
},
data: graphdata,
trace: {
toggle: false,
scale: 1.45,
Expand Down
37 changes: 18 additions & 19 deletions clip/initParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const initParams = [
accent:"#f4f4f4",
secondary:"#ff4343",
primary:"#202020",
font:"Outfit"
},
intro: {
slogan:"Write your company name above and an intriguing summary of what your company does here.",
Expand Down Expand Up @@ -97,42 +96,42 @@ export const initParams = [
maxValue:40,
dataSets:[
{
"title": "PhaseA",
"color": "#ff1f4c"
title: "PhaseA",
color: "#ff1f4c"
},
{
"title": "PhaseB",
"color": "#ff82ad"
title: "PhaseB",
color: "#ff82ad"
}
],
data:[
{
"name": "Id1",
"values": [10, 18]
name: "Id1",
values: [10, 18]
},
{
"name": "Id2",
"values": [15, 27]
name: "Id2",
values: [15, 27]
},
{
"name": "Id3",
"values": [29, 23]
name: "Id3",
values: [29, 23]
},
{
"name": "Id4",
"values": [31, 35]
name: "Id4",
values: [31, 35]
},
{
"name": "Id5",
"values": [29, 23]
name: "Id5",
values: [29, 23]
},
{
"name": "Id6",
"values": [15, 27]
name: "Id6",
values: [15, 27]
},
{
"name": "Id7",
"values": [10, 18]
name: "Id7",
values: [10, 18]
}
],
}
Expand Down
Loading

0 comments on commit f0a6bf1

Please sign in to comment.