{"id":929,"date":"2026-07-07T08:59:56","date_gmt":"2026-07-07T08:59:56","guid":{"rendered":"https:\/\/www.vpascode.com\/vn\/docs\/uncategorized\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/"},"modified":"2026-07-29T08:35:21","modified_gmt":"2026-07-29T08:35:21","slug":"mermaid-js-xy-chart-syntax-configuration-guide","status":"publish","type":"ld_docs","link":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/","title":{"rendered":"Mermaid.js XY Chart Syntax &#038; Configuration Guide"},"content":{"rendered":"<p>An XY Chart is a comprehensive data visualization component used to render both line charts and bar charts on a standard two-dimensional grid coordinate layout. Introduced to replace and consolidate older standalone charting schemas, the <code>xychart-beta<\/code> rendering engine dynamically processes custom numerical datasets, auto-scales responsive structural grids, and supports displaying multiple independent overlapping data series at the same time.<\/p>\n<h2>Basic Syntax Structure<\/h2>\n<p>Every XY Chart begins with the <code>xychart-beta<\/code> declaration header. It is followed by configuring a horizontal X-axis category array, a vertical Y-axis title or data range limit, and at least one explicit data plotting series (such as a <code>line<\/code> or <code>bar<\/code> block).<\/p>\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/#mermaid:eNqrqEzOSCwq0U1KLUnk5VJQKMksyUlVUApOzC0A0gGpRWn5RbmJecmpCs4gdUogNRW6iRWZxQrRXol5OgpuqUk6Cr6JRToKjgVFsSDpSoi0UlBqWWpeaaqCRmiwiyZYY1JikUK0iamBgY6CqRGINDMEsy0MDGIBnPcnPw==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code data-language=\"mermaid\" class=\"language-mermaid\">xychart-beta\r\n  title \"Sample Performance Chart\"\r\n  x-axis [Jan, Feb, Mar, Apr]\r\n  y-axis \"Revenue (USD)\"\r\n  bar [4500, 5200, 6100, 5800]<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/#mermaid:eNqrqEzOSCwq0U1KLUnk5VJQKMksyUlVUApOzC0A0gGpRWn5RbmJecmpCs4gdUogNRW6iRWZxQrRXol5OgpuqUk6Cr6JRToKjgVFsSDpSoi0UlBqWWpeaaqCRmiwiyZYY1JikUK0iamBgY6CqRGINDMEsy0MDGIBnPcnPw==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<p id=\"oUNkvSl\"><img fetchpriority=\"high\" decoding=\"async\" width=\"700\" height=\"500\" class=\"alignnone size-full wp-image-931 \" src=\"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc0702c7c7.png\" alt=\"\" srcset=\"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc0702c7c7.png 700w, https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc0702c7c7-300x214.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<h2>Syntax Reference<\/h2>\n<p>The table below breaks down the primary data definitions and configuration keys required to structure an XY Chart correctly in Mermaid.js.<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n<thead>\n<tr>\n<th>Syntax Component<\/th>\n<th>Accepted Formats<\/th>\n<th>Description &amp; Usage Rules<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Declaration<\/strong><\/td>\n<td>Keyword<\/td>\n<td>Initializes the 2D layout chart workspace. Must use the exact <code>xychart-beta<\/code> string block.<\/td>\n<\/tr>\n<tr>\n<td><strong>Title<\/strong><\/td>\n<td>Quoted String<\/td>\n<td>An optional global heading displayed centered immediately above the chart canvas grid.<\/td>\n<\/tr>\n<tr>\n<td><strong>X-Axis Configuration<\/strong><\/td>\n<td>Bracketed List \/ Range<\/td>\n<td>Defines horizontal scale labels. Accepts categorical text strings inside brackets <code>[A, B, C]<\/code> or numerical point ranges <code>[100 --&gt; 500]<\/code>.<\/td>\n<\/tr>\n<tr>\n<td><strong>Y-Axis Configuration<\/strong><\/td>\n<td>Title String \/ Scale Bounds<\/td>\n<td>Sets up the vertical scale parameters. Can simply be an axis title string, or customized to limit lower\/upper value ranges using <code>\"Title\" 0 --&gt; 100<\/code>.<\/td>\n<\/tr>\n<tr>\n<td><strong>Bar Plotting Series<\/strong><\/td>\n<td>Numeric Array<\/td>\n<td>Renders datasets as vertical bars. The count of elements inside the data array must perfectly match your X-axis category length.<\/td>\n<\/tr>\n<tr>\n<td><strong>Line Plotting Series<\/strong><\/td>\n<td>Numeric Array<\/td>\n<td>Renders datasets as continuous lines connecting data points across the grid workspace.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>Advanced Data Customization (Directives)<\/h2>\n<p>You can fine-tune your chart workspace&#8217;s visual look by embedding a frontmatter configuration block at the absolute top of your document code snippet. This gives you complete layout control over custom hex colors, plot series line weights, and grid display visibility fields.<\/p>\n<h3>XY Chart Configuration Attribute Matrix<\/h3>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n<thead>\n<tr>\n<th>Property Configuration Key<\/th>\n<th>Value Options<\/th>\n<th>Visual Result<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>showLine<\/code><\/td>\n<td><code>true<\/code> | <code>false<\/code><\/td>\n<td>Toggles whether the background structural axis line grid strokes display across coordinates.<\/td>\n<\/tr>\n<tr>\n<td><code>chartWidth<\/code><\/td>\n<td>Integer (Pixels)<\/td>\n<td>Sets the fixed bounding canvas layout width of the grid system.<\/td>\n<\/tr>\n<tr>\n<td><code>chartHeight<\/code><\/td>\n<td>Integer (Pixels)<\/td>\n<td>Sets the fixed bounding canvas layout height of the grid system.<\/td>\n<\/tr>\n<tr>\n<td><code>themeVariables.xyChart<\/code><\/td>\n<td>Color Mapping Arrays<\/td>\n<td>Injects explicit hex styling color blocks (e.g., <code>backgroundColor<\/code>, <code>titleColor<\/code>, or custom color list slots <code>plotColorPalette<\/code>) into your plots.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>Real-World Blueprint: Multi-Series Technical Comparison<\/h2>\n<p>This comprehensive blueprint tracks an infrastructure performance review. It utilizes a custom config directive to fix the canvas dimension sizes, show background grid line paths, and inject an explicit hex color palette. It maps four distinct quarterly phases, rendering them as a combined visual combination chart (overlapping bar series and line series charts together).<\/p>\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/#mermaid:eNpVkDFPwzAQhfdK\/Q9P7hpLTkiakoEBVIkBpBYJGKoOTrg2ltIY2RdI\/z1O2kIZLN29d\/c9+aSU00ll253ZF9MJ0B+rWjsea2Cs380H1wVypa7ERzL7mgukF9XX9vvJtFSAXUeDxjUd6E07o8uG\/Jn4nx+GDDf0YBvrCoiZUnlyH4uL+dlYHr2VboiZ\/kYizJZqrpQKs3L4wpkrS2I9hg9ciHUs1yleyNvOVYQvj2VPVcfGtngmdqbyY1ovdW88NmLdBQo5xCLCb5NcNzfXTSq2w\/rxtC5W5HbWHXQbsk54vLaGvYCClHeIT9cqtcMmzSLMw1uoCLfZiGnC\/bDJBiOIeRLMxfYH8JVz6w==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code data-language=\"mermaid\" class=\"language-mermaid\">---\r\nconfig:\r\n  xychart:\r\n    chartWidth: 700\r\n    chartHeight: 400\r\n    showLine: true\r\n  themeVariables:\r\n    xychart:\r\n      titleColor: \"#0072B1\"\r\n      plotColorPalette: \"#0072B1, #E06000\"\r\n---\r\nxychart-beta\r\n  title \"Q1-Q4 Resource vs Execution Metrics\"\r\n  x-axis [\"Quarter 1\", \"Quarter 2\", \"Quarter 3\", \"Quarter 4\"]\r\n  y-axis \"Performance Metric Units\" 0 --&gt; 100\r\n  bar [45, 65, 80, 95]\r\n  line [55, 60, 72, 88]<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/#mermaid:eNpVkDFPwzAQhfdK\/Q9P7hpLTkiakoEBVIkBpBYJGKoOTrg2ltIY2RdI\/z1O2kIZLN29d\/c9+aSU00ll253ZF9MJ0B+rWjsea2Cs380H1wVypa7ERzL7mgukF9XX9vvJtFSAXUeDxjUd6E07o8uG\/Jn4nx+GDDf0YBvrCoiZUnlyH4uL+dlYHr2VboiZ\/kYizJZqrpQKs3L4wpkrS2I9hg9ciHUs1yleyNvOVYQvj2VPVcfGtngmdqbyY1ovdW88NmLdBQo5xCLCb5NcNzfXTSq2w\/rxtC5W5HbWHXQbsk54vLaGvYCClHeIT9cqtcMmzSLMw1uoCLfZiGnC\/bDJBiOIeRLMxfYH8JVz6w==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<p id=\"Uaxrodh\"><img decoding=\"async\" width=\"700\" height=\"500\" class=\"alignnone size-full wp-image-932 \" src=\"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc07cdd4df.png\" alt=\"\" srcset=\"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc07cdd4df.png 700w, https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc07cdd4df-300x214.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<hr \/>\n<p><em><strong>Syntax Tip:<\/strong> When overlaying multiple data plots (such as running a <code>bar<\/code> dataset and a <code>line<\/code> dataset inside the same layout canvas), the rendering engine will stack or draw them sequentially in the order they are written in the text script. Arrange your data blocks intentionally to avoid visual clipping on the canvas lines.<\/em><\/p>\n<hr \/>\n<h2>Common Syntax Pitfalls &amp; System Constraints<\/h2>\n<p>When compiling dimensional matrix paths, a few subtle configuration slips will disrupt coordinates calculations. Keep these troubleshooting parameters in mind:<\/p>\n<ul>\n<li><strong>Data Length Mismatch:<\/strong> Every single <code>bar<\/code> or <code>line<\/code> data series array *must* contain the exact same number of entries as defined in your <code>x-axis<\/code> list parameter. Having 4 categories on your X-axis but providing a data list of 5 numbers will completely break chart compilation.<\/li>\n<li><strong>Quotation Boundaries:<\/strong> When specifying categories inside an axis list brackets, text blocks that contain spaces or special punctuation characters must be enclosed cleanly in double quotation marks (e.g., <code>[\"Phase 1\", \"Phase 2\"]<\/code>).<\/li>\n<li><strong>Numerical Coordinate Bounds:<\/strong> When setting manual ranges on an axis scale (such as <code>0 --&gt; 500<\/code>), you must explicitly use two dashes followed by a greater-than symbol (<code>--&gt;<\/code>). Forgetting a dash or separating the operator characters with spaces will trigger a processing layout error.<\/li>\n<li><strong>Positive Integer Weights:<\/strong> Scale values map to linear space blocks. Ensure values passed to your series do not contain unescaped character elements or empty parameter null voids inside arrays.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>An XY Chart is a comprehensive data visualization component used to render both line charts and bar charts on a standard two-dimensional grid coordinate layout. Introduced to replace and consolidate older standalone charting schemas, the xychart-beta rendering engine dynamically processes&#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":48,"menu_order":16,"template":"","meta":{"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"ld_collection":[14],"class_list":["post-929","ld_docs","type-ld_docs","status-publish","hentry","ld_collection-vpascode-docs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mermaid XY Chart Syntax | VPasCode Text to Diagram Guide<\/title>\n<meta name=\"description\" content=\"Plot line and bar combination graphs from text scripts using Mermaid XY charts in VPasCode, a free diagram-as-code tool.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mermaid XY Chart Syntax | VPasCode Text to Diagram Guide\" \/>\n<meta property=\"og:description\" content=\"Plot line and bar combination graphs from text scripts using Mermaid XY charts in VPasCode, a free diagram-as-code tool.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"VPasCode\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-29T08:35:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc0702c7c7.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 ph\u00fat\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-xy-chart-syntax-configuration-guide\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-xy-chart-syntax-configuration-guide\\\/\",\"name\":\"Mermaid XY Chart Syntax | VPasCode Text to Diagram Guide\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-xy-chart-syntax-configuration-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-xy-chart-syntax-configuration-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/wp-content\\\/uploads\\\/sites\\\/12\\\/2026\\\/07\\\/img_6a4cc0702c7c7.png\",\"datePublished\":\"2026-07-07T08:59:56+00:00\",\"dateModified\":\"2026-07-29T08:35:21+00:00\",\"description\":\"Plot line and bar combination graphs from text scripts using Mermaid XY charts in VPasCode, a free diagram-as-code tool.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-xy-chart-syntax-configuration-guide\\\/#breadcrumb\"},\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-xy-chart-syntax-configuration-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-xy-chart-syntax-configuration-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/wp-content\\\/uploads\\\/sites\\\/12\\\/2026\\\/07\\\/img_6a4cc0702c7c7.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/wp-content\\\/uploads\\\/sites\\\/12\\\/2026\\\/07\\\/img_6a4cc0702c7c7.png\",\"width\":700,\"height\":500},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-xy-chart-syntax-configuration-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lean Docs\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/%ld_collection%\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Mermaid.js Playbook\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Mermaid.js XY Chart Syntax &#038; Configuration Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#website\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/\",\"name\":\"VPasCode\",\"description\":\"by Visual Paradigm\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"vi\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#organization\",\"name\":\"VPasCode\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/wp-content\\\/uploads\\\/sites\\\/12\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/wp-content\\\/uploads\\\/sites\\\/12\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"width\":128,\"height\":138,\"caption\":\"VPasCode\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mermaid XY Chart Syntax | VPasCode Text to Diagram Guide","description":"Plot line and bar combination graphs from text scripts using Mermaid XY charts in VPasCode, a free diagram-as-code tool.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/","og_locale":"vi_VN","og_type":"article","og_title":"Mermaid XY Chart Syntax | VPasCode Text to Diagram Guide","og_description":"Plot line and bar combination graphs from text scripts using Mermaid XY charts in VPasCode, a free diagram-as-code tool.","og_url":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/","og_site_name":"VPasCode","article_modified_time":"2026-07-29T08:35:21+00:00","og_image":[{"url":"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc0702c7c7.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"4 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/","url":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/","name":"Mermaid XY Chart Syntax | VPasCode Text to Diagram Guide","isPartOf":{"@id":"https:\/\/www.vpascode.com\/vn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc0702c7c7.png","datePublished":"2026-07-07T08:59:56+00:00","dateModified":"2026-07-29T08:35:21+00:00","description":"Plot line and bar combination graphs from text scripts using Mermaid XY charts in VPasCode, a free diagram-as-code tool.","breadcrumb":{"@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/#primaryimage","url":"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc0702c7c7.png","contentUrl":"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/07\/img_6a4cc0702c7c7.png","width":700,"height":500},{"@type":"BreadcrumbList","@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-xy-chart-syntax-configuration-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vpascode.com\/vn\/"},{"@type":"ListItem","position":2,"name":"Lean Docs","item":"https:\/\/www.vpascode.com\/vn\/docs\/%ld_collection%\/"},{"@type":"ListItem","position":3,"name":"Mermaid.js Playbook","item":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/"},{"@type":"ListItem","position":4,"name":"Mermaid.js XY Chart Syntax &#038; Configuration Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.vpascode.com\/vn\/#website","url":"https:\/\/www.vpascode.com\/vn\/","name":"VPasCode","description":"by Visual Paradigm","publisher":{"@id":"https:\/\/www.vpascode.com\/vn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vpascode.com\/vn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/www.vpascode.com\/vn\/#organization","name":"VPasCode","url":"https:\/\/www.vpascode.com\/vn\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/www.vpascode.com\/vn\/#\/schema\/logo\/image\/","url":"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/06\/cropped-vp-online-logo-v1.png","contentUrl":"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/06\/cropped-vp-online-logo-v1.png","width":128,"height":138,"caption":"VPasCode"},"image":{"@id":"https:\/\/www.vpascode.com\/vn\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/ld_docs\/929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/ld_docs"}],"about":[{"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/types\/ld_docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/users\/3"}],"up":[{"embeddable":true,"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/ld_docs\/48"}],"wp:attachment":[{"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/media?parent=929"}],"wp:term":[{"taxonomy":"ld_collection","embeddable":true,"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/ld_collection?post=929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}