File size: 960 Bytes
d694d1e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
import plotly.graph_objects as go
import random
def create_comparison_chart(user_data):
categories = ['Team Strength', 'Market Potential', 'Mission Clarity', 'Innovation', 'Scalability']
# Generate random scores for the user's company and a top-tier company
user_scores = [random.uniform(0.3, 0.9) for _ in range(len(categories))]
top_tier_scores = [random.uniform(0.7, 1.0) for _ in range(len(categories))]
fig = go.Figure()
fig.add_trace(go.Scatterpolar(
r=user_scores,
theta=categories,
fill='toself',
name='Your Company'
))
fig.add_trace(go.Scatterpolar(
r=top_tier_scores,
theta=categories,
fill='toself',
name='Top-Tier Company'
))
fig.update_layout(
polar=dict(
radialaxis=dict(
visible=True,
range=[0, 1]
)),
showlegend=True
)
return fig |