WorkFlowViz
Transform your task data into interactive workflow visualizations with a single line of code. WorkflowViz.js is a lightweight JavaScript library that helps you create beautiful, dynamic flowcharts to track project progress, visualize task dependencies, and highlight important milestones.
Install / Use
/learn @NarendraYSF/WorkFlowVizREADME
WorkflowViz.js
A lightweight JavaScript library for creating interactive workflow visualizations. Transform your task management data into beautiful, interactive flowcharts with minimal setup.
Features
- Drag-and-drop workflow builder
- Real-time status updates
- Customizable node styles and transitions
- Built-in templates for common workflow patterns
- Export/import functionality
- Mobile-responsive design
- Zero dependencies
Installation
npm install workflow-viz
# or
yarn add workflow-viz
Quick Start
import WorkflowViz from 'workflow-viz';
// Initialize with a container element
const workflow = new WorkflowViz('#workflow-container');
Simple Usage Examples
1. Create a Single Workflow Line
<div id="simple-workflow"></div>
<script>
// Define workflow steps with timestamps and status
var line = {
name: "Project Alpha",
data: [
[1707235200000, "Planning"], // Feb 6, 2024
[1707321600000, "Development"], // Feb 7, 2024
[1707408000000, "Testing"] // Feb 8, 2024
]
};
// Add important milestones or events
var markers = [
[1707321600000, "Development Sprint Started"],
[1707408000000, "QA Review Completed"]
];
$('#simple-workflow').workflowviz(line, markers);
</script>
2. Create Multiple Workflow Lines
<div id="multi-workflow"></div>
<script>
// Define multiple workflow streams
var frontend = {
name: "Frontend Development",
data: [
[1707235200000, "Design"],
[1707321600000, "Implementation"],
[1707408000000, "Testing"]
]
};
var backend = {
name: "Backend Development",
data: [
[1707235200000, "Architecture"],
[1707321600000, "API Development"],
[1707408000000, "Integration"]
]
};
var lines = [frontend, backend];
// Add shared milestones
var markers = [
[1707321600000, "Sprint 1 Review"],
[1707408000000, "Integration Complete"]
];
$('#multi-workflow').workflowviz(lines, markers);
</script>
3. Customize Workflow Visualization
<div id="custom-workflow"></div>
<script>
var line = {
name: "Release Pipeline",
data: [
[1707235200000, "Development"],
[1707321600000, "Testing"],
[1707408000000, "Deployment"]
]
};
var markers = [
[1707408000000, "Production Release"]
];
// Custom options
var options = {
theme: 'dark',
nodeStyle: {
shape: 'rectangle',
color: '#4A90E2'
},
markerStyle: {
icon: 'flag',
color: '#E24A90'
},
dateFormat: 'MMM DD, YYYY'
};
$('#custom-workflow').workflowviz(line, markers, options);
</script>
Advanced Usage
Custom Node Templates
workflow.defineTemplate('custom', {
shape: 'hexagon',
size: { width: 120, height: 80 },
style: {
fill: '#e6f3ff',
stroke: '#0066cc',
textColor: '#333333'
}
});
workflow.addNode({
id: 'special-task',
label: 'Custom Process',
template: 'custom'
});
Event Handling
workflow.on('nodeClick', (node) => {
console.log(`Node ${node.id} clicked`);
});
workflow.on('connectionCreated', (source, target) => {
console.log(`New connection: ${source} → ${target}`);
});
State Management
// Update node status
workflow.updateNode('task1', {
status: 'completed',
metadata: {
completedBy: 'John Doe',
timestamp: Date.now()
}
});
// Get workflow state
const state = workflow.exportState();
Configuration Options
const config = {
theme: 'light', // 'light' or 'dark'
autoLayout: true, // Enable automatic node positioning
gridSize: 20, // Snap-to-grid size in pixels
animationDuration: 300, // Transition duration in milliseconds
readonly: false, // Disable editing capabilities
connectorStyle: 'curved' // 'straight', 'curved', or 'orthogonal'
};
const workflow = new WorkflowViz('#container', config);
API Reference
Core Methods
addNode(config): Add a new node to the workflowremoveNode(id): Remove a node by IDconnect(sourceId, targetId): Create a connection between nodesdisconnect(sourceId, targetId): Remove a connectionclear(): Remove all nodes and connectionsexportState(): Export the current workflow stateimportState(state): Import a workflow staterender(): Update the visualization
Events
nodeClick: Fired when a node is clickednodeDragStart: Fired when node dragging beginsnodeDragEnd: Fired when node dragging endsconnectionCreated: Fired when a new connection is createdconnectionRemoved: Fired when a connection is removedstateChanged: Fired when the workflow state changes
Browser Support
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- IE11 (with polyfills)
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
MIT License - see the LICENSE file for details.
Support
- Documentation: docs.workflowviz.js.org
- Issues: GitHub Issues
- Discord: Join our community
Credits
Created and maintained by the WorkflowViz team. Special thanks to all our contributors!
Related Skills
node-connect
341.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.5kCommit, push, and open a PR
