Skip to content

Added examples for Chart components #1540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
added changes to table and other components
  • Loading branch information
adnanqaops committed Feb 24, 2025
commit ad1209523efdd617e759171981f45997397c69fa
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function GeoMapChartExample() {
width={500}
height={300}
config={{
mapZoomLevel: "1",
}}
compFactory={ChartCompWithDefault}
/>
Expand All @@ -40,6 +41,7 @@ export default function GeoMapChartExample() {
width={500}
height={300}
config={{
mapZoomLevel: "3",
}}
compFactory={ChartCompWithDefault}
/>
Expand All @@ -48,30 +50,43 @@ export default function GeoMapChartExample() {
width={500}
height={300}
config={{
mapZoomLevel: "5",
}}
compFactory={ChartCompWithDefault}
/>
<Example
title="Center Position ( Lat, Lon) - Spain"
width={500}
title="Center Position ( Lat, Long) - Spain"
width={700}
height={300}
hideSettings={true}
config={{
mapCenterLng: "-0.5033",
mapCenterLat: "40.5235",
mapZoomLevel: "5",
}}
compFactory={ChartCompWithDefault}
/>
<Example
title="Center Position ( Lat, Lon) - USA"
width={500}
width={700}
height={300}
hideSettings={true}
config={{
mapCenterLng: "-97.5348",
mapCenterLat: "38.7946",
mapZoomLevel: "5",
}}
compFactory={ChartCompWithDefault}
/>
<Example
title="Center Position ( Lat, Lon) - Turkey"
width={500}
width={700}
height={300}
hideSettings={true}
config={{
mapCenterLng: "38.5348",
mapCenterLat: "38.7946",
mapZoomLevel: "5",
}}
compFactory={ChartCompWithDefault}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function MermaidChartExample() {
width={500}
height={300}
config={{
code: "graph LR\n Planning --> Defining --> Designing --> Building --> Testing --> Deployment --> Planning",
code: "graph LR\n Planning --> Defining --> Designing --> Building --> Testing --> Deployment --> Planning",
}}
compFactory={ChartCompWithDefault}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,42 @@ export default function OpenLayersGeoMapChartExample() {
}}
compFactory={ChartCompWithDefault}
/>
<Example
title="Center Position - USA"
width={500}
height={300}
config={{
center: "[-92.5348,38.7946]",
}}
compFactory={ChartCompWithDefault}
/>
<Example
title="Zoom Level - 3"
width={500}
height={300}
config={{
zoom: "3",
}}
compFactory={ChartCompWithDefault}
/>
<Example
title="Zoom Level - 7"
width={500}
height={300}
config={{
zoom: "7",
}}
compFactory={ChartCompWithDefault}
/>
<Example
title="Zoom Level - 10"
width={500}
height={300}
config={{
zoom: "10",
}}
compFactory={ChartCompWithDefault}
/>
</ExampleGroup>
</>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
import { SplitLayoutComp } from "comps/comps/splitLayout/splitLayout";
import Example from "../../common/Example";
import ExampleGroup from "../../common/ExampleGroup";

const columns= {
"manual": [
{
"id": 0,
"label": "Area 1",
"key": "Area1",
"minWidth": "10%",
"maxWidth": "90%",
"width": "50%",
"collapsible": false,
"background": "",
"backgroundImage": "",
"padding": ""
},
{
"id": 1,
"label": "Area 2",
"key": "Area2",
"minWidth": "10%",
"maxWidth": "90%",
"width": "50%",
"collapsible": true,
"background": "",
"backgroundImage": "",
"padding": ""
},
{
"id": 2,
"label": "Option 1",
"key": "Option 1",
"minWidth": "10%",
"maxWidth": "90%",
"width": "50%",
"collapsible": false,
"background": "",
"backgroundImage": "",
"padding": ""
}
]
};

const bodyStyle= {
background: "#FFFFFF",
border: "#222222",
};

const columnStyle= {
background: "#FFFFFF",
border: "#222222",
margin: "10px",
};

export default function SplitLayoutExample() {
return (
<>
<ExampleGroup
title="Basic Usage"
description="The Following Examples Show the Basic Usage of the Split Layout Component."
>
<Example
title="Default Component"
hideSettings={true}
width={1000}
config={{
bodyStyle: bodyStyle,
columnStyle: columnStyle,
}}
compFactory={SplitLayoutComp}
/>
<Example
title="Multiple Split Layout containers ( Click on the icon at the center on right side ) "
hideSettings={true}
width={1000}
config={{
columns: columns,
bodyStyle: bodyStyle,
columnStyle: columnStyle,
}}
compFactory={SplitLayoutComp}
/>
<Example
title="Setting Minimum Width - 30%"
hideSettings={true}
width={1000}
config={{
columns: {
"manual": [
{
"id": 0,
"label": "Area 1",
"key": "Area1",
"minWidth": "30%",
"maxWidth": "90%",
"width": "50%",
"collapsible": false,
"background": "",
"backgroundImage": "",
"padding": ""
},
{
"id": 1,
"label": "Area 2",
"key": "Area2",
"minWidth": "30%",
"maxWidth": "90%",
"width": "50%",
"collapsible": true,
"background": "",
"backgroundImage": "",
"padding": ""
},
{
"id": 2,
"label": "Option 1",
"key": "Option 1",
"minWidth": "30%",
"maxWidth": "90%",
"width": "50%",
"collapsible": false,
"background": "",
"backgroundImage": "",
"padding": ""
}
]
},
bodyStyle: bodyStyle,
columnStyle: columnStyle,
}}
compFactory={SplitLayoutComp}
/>
<Example
title="Setting Minimum Width - 10%"
hideSettings={true}
width={1000}
config={{
columns: columns,
bodyStyle: bodyStyle,
columnStyle: columnStyle,
}}
compFactory={SplitLayoutComp}
/>
</ExampleGroup>

<ExampleGroup
title="Layout"
description="The Following Examples Show the different layouts of the Split Layout Component."
>
<Example
title="Split Layout Orientation - Vertical"
hideSettings={true}
width={1000}
config={{
bodyStyle: bodyStyle,
columnStyle: columnStyle,
orientation: "vertical",
}}
compFactory={SplitLayoutComp}
/>
<Example
title="Split Layout Orientation - Horizontal"
hideSettings={true}
width={1000}
config={{
bodyStyle: bodyStyle,
columnStyle: columnStyle,
orientation: "horizontal",
}}
compFactory={SplitLayoutComp}
/>
</ExampleGroup>

<ExampleGroup
title="Styling Properties"
description="The Following Examples Show the different Styling properties on the Split Layout Component."
>
<Example
title="Body Styling - Background Color, Border, Padding"
hideSettings={true}
width={1000}
config={{
bodyStyle: {
"background": "linear-gradient(135deg, #72afd3 0%, #96e6a1 100%)",
"border": "#222222",
"borderWidth": "2px",
"padding": "10px",
},
columnStyle: columnStyle,
}}
compFactory={SplitLayoutComp}
/>
<Example
title="Column Styling - Background Color, Border, Margin"
hideSettings={true}
width={1000}
config={{
bodyStyle: bodyStyle,
columnStyle: {
"background": "linear-gradient(0deg, #f43b47 0%, #453a94 100%)",
"border": "#222222",
"borderWidth": "2px",
"borderStyle": "solid",
"margin": "10px",
},
}}
compFactory={SplitLayoutComp}
/>
</ExampleGroup>
</>
);
}
Loading
Loading