Update process_flow_generator.py
Browse files
process_flow_generator.py
CHANGED
@@ -3,11 +3,7 @@ import json
|
|
3 |
from tempfile import NamedTemporaryFile
|
4 |
import os
|
5 |
|
6 |
-
|
7 |
-
# as process flow diagrams have a different structure and node addition logic.
|
8 |
-
# However, we'll re-implement the color gradient logic directly for consistency.
|
9 |
-
|
10 |
-
def generate_process_flow_diagram(json_input: str) -> str: # Removed base_color parameter
|
11 |
"""
|
12 |
Generates a Process Flow Diagram (Flowchart) from JSON input.
|
13 |
|
@@ -124,10 +120,6 @@ def generate_process_flow_diagram(json_input: str) -> str: # Removed base_color
|
|
124 |
|
125 |
base_color = '#19191a' # Hardcoded base color
|
126 |
|
127 |
-
# Helper for color and font based on depth (simulated for flowcharts if needed, or consistent color)
|
128 |
-
# For flowcharts, often all process/decision nodes are the same color.
|
129 |
-
# If a gradient is desired, a 'depth' could be manually assigned or derived.
|
130 |
-
# For simplicity and typical flowchart appearance, we'll use a consistent base_color for all nodes.
|
131 |
fill_color_for_nodes = base_color
|
132 |
font_color_for_nodes = 'white' if base_color == '#19191a' or base_color.lower() in ['#000000', '#19191a'] else 'black'
|
133 |
|
|
|
3 |
from tempfile import NamedTemporaryFile
|
4 |
import os
|
5 |
|
6 |
+
def generate_process_flow_diagram(json_input: str) -> str:
|
|
|
|
|
|
|
|
|
7 |
"""
|
8 |
Generates a Process Flow Diagram (Flowchart) from JSON input.
|
9 |
|
|
|
120 |
|
121 |
base_color = '#19191a' # Hardcoded base color
|
122 |
|
|
|
|
|
|
|
|
|
123 |
fill_color_for_nodes = base_color
|
124 |
font_color_for_nodes = 'white' if base_color == '#19191a' or base_color.lower() in ['#000000', '#19191a'] else 'black'
|
125 |
|