""" Configuration module for graph visualization styles """ from st_link_analysis import NodeStyle, EdgeStyle # Node styles configuration NODE_STYLES = [ NodeStyle("EVENT", "#FF7F3E", "name", "description"), NodeStyle("PERSON", "#4CAF50", "name", "person"), NodeStyle("ORGANIZATION", "#9C27B0", "name", "business"), NodeStyle("LOCATION", "#2196F3", "name", "place"), NodeStyle("THEME", "#FFC107", "name", "sell"), NodeStyle("COUNT", "#795548", "name", "inventory"), NodeStyle("AMOUNT", "#607D8B", "name", "wallet"), ] NODE_TYPES = { 'event': { 'color': '#1f77b4', 'description': 'GDELT Events' }, 'person': { 'color': '#2ca02c', 'description': 'Named Persons' }, 'organization': { 'color': '#ffa500', 'description': 'Organizations' }, 'location': { 'color': '#ff0000', 'description': 'Geographic Locations' }, 'theme': { 'color': '#800080', 'description': 'Event Themes' } } # Edge styles configuration EDGE_STYLES = [ EdgeStyle("MENTIONED_IN", caption="label", directed=True), EdgeStyle("LOCATED_IN", caption="label", directed=True), EdgeStyle("CATEGORIZED_AS", caption="label", directed=True) ] # Layout options LAYOUT_OPTIONS = ["cose", "circle", "grid", "breadthfirst", "concentric"] # Default graph display settings DEFAULT_GRAPH_HEIGHT = 500 DEFAULT_LAYOUT = "cose" # Column configuration for data grid GRID_COLUMNS = { "ID": {"width": "medium"}, "Date": {"width": "small"}, "Source": {"width": "medium"}, "Tone": {"width": "small", "format": "%.2f"} }