📊

Victory

مكتبة رسوم بيانية React قابلة للتخصيص (React Chart Components)

(3/5)
👁️ 3 مشاهدة
📅 02 Jul 2026
🌐 عام

مستوى الخبرة المطلوب:

⚡ متوسط 🚀 محترف
🔗 زيارة الموقع الرسمي
3
تقييم المستخدمين
التصنيف 📊 Charts
المشاهدات 3
تاريخ الإضافة 02/07/2026
آخر تحديث 02/07/2026

📖 الوصف

Victory هي مجموعة من المكونات لإنشاء تصاميم رسوم بيانية تفاعلية في React و React Native. من تطوير Formidable Labs، تقدم Victory مجموعة متسقة من المكونات ذات API موحد وسهل الفهم. تختلف عن Recharts في كونها أكثر مرونة في التصميم مع declarative composition model، مما يسمح بإعادة استخدام وتجميع المكونا...

🎯 يستخدم في

مجالات استخدام هذه الأداة

React applications

React Native mobile apps

Custom dashboards

Data visualization in apps

Shareable chart components

المميزات

أبرز مميزات هذه الأداة

React & React Native unified API

Declarative composition

Accessible by default (ARIA)

Theming system مرن

Animation system متقدم

Tooltip & Cursor interactions

Brush & Zoom

TypeScript types

SSR support

Composable components

Active Formium development

⚠️ العيوب

نقاط يجب مراعاتها

×

React only

×

Learning curve متوسط (أصعب من Recharts)

×

Community أصغر من Recharts

×

Bundle size متوسط

×

بعض الميزات تحتاج packages إضافية

×

Documentation أحياناً غير مكتملة

×

Not ideal for beginners

🔄 البدائل

أدوات بديلة يمكنك استخدامها

Recharts
Nivo
Visx
Chart.js

💻 مثال على الاستخدام

كيفية استخدام هذه الأداة

Example Code
import { VictoryChart, VictoryLine, VictoryAxis, VictoryTheme } from 'victory';
import { VictoryBar } from 'victory-bar';

// Line Chart
function SalesChart() {
  const data = [
    { month: 1, sales: 45 },
    { month: 2, sales: 90 },
    { month: 3, sales: 150 },
    { month: 4, sales: 220 },
    { month: 5, sales: 180 },
  ];

  return (
    <VictoryChart
      theme={VictoryTheme.material}
      domainPadding={{ x: 20 }}
    >
      <VictoryAxis
        label="الشهر"
        tickFormat={(t) => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو'][t - 1]}
      />
      <VictoryAxis
        dependentAxis
        label="المبيعات"
      />
      <VictoryLine
        data={data}
        x="month"
        y="sales"
        style={{
          data: { stroke: '#c43a31', strokeWidth: 3 },
          parent: { border: '1px solid #ccc' }
        }}
      />
    </VictoryChart>
  );
}

// Multi-series chart
function MultiChart() {
  const salesData = [
    { x: 'Q1', y: 100 },
    { x: 'Q2', y: 150 },
  ];
  
  const profitData = [
    { x: 'Q1', y: 40 },
    { x: 'Q2', y: 80 },
  ];

  return (
    <VictoryChart domainPadding={{ x: 30 }}>
      <VictoryBar data={salesData} style={{ data: { fill: 'tomato' } }} />
      <VictoryBar data={profitData} style={{ data: { fill: 'orange' } }} />
    </VictoryChart>
  );
}

// Animation
<VictoryChart>
  <VictoryLine
    y={x => Math.sin(x * 3)}
    animate={{
      onEnter: {
        duration: 1000,
        before: () => ({ y: 0 }),
        after: (datum) => datum
      }
    }}
  />
</VictoryChart>

📚 أدوات أخرى في Charts

قد يعجبك أيضاً