[READ-ONLY] Mirror of https://github.com/graphieros/vue-data-ui. An open source user-empowering data visualization Vue 3 components library for eloquent data storytelling vue-data-ui.graphieros.com/
charts components-library dashboard data-storytelling data-visualization donut gauge heatmap quadrant radar rating-stars scatter screenshot skeleton-loader sparkline table vue-data-ui vue3 vuejs vuejs3
3

Configure Feed

Select the types of activity you want to include in your feed.

Fix - slugify - keep Unicode letters and numbers in slugs

slugify() removed every non-ASCII character via [^\w-], so CJK or accent-only labels collapsed to an empty string. VueUiRidgeline derives each datapoint's id, legend key and gradient element id from slugify(name), so distinct non-ASCII series shared one id: merged legend entries, broken segregation toggles and colliding SVG gradient ids. Match Unicode letters and numbers instead; punctuation and symbol stripping is unchanged.

greymoth (Jun 30, 2026, 6:41 AM +0900) 777f7275 387a21b9

+26 -1
+1 -1
src/lib.js
··· 3804 3804 .toString() 3805 3805 .toLowerCase() 3806 3806 .replace(/\s+/g, '-') // Replace spaces with - 3807 - .replace(/[^\w\-]+/g, '') // Remove all non-word chars 3807 + .replace(/[^\p{L}\p{N}_-]+/gu, '') // Remove all non-word chars, keeping Unicode letters and numbers 3808 3808 .replace(/\-\-+/g, '-') // Replace multiple - with single - 3809 3809 .replace(/^-+/, '') // Trim start 3810 3810 .replace(/-+$/, ''); // Trim end
+25
tests/lib.test.js
··· 95 95 setOpacity, 96 96 setOpacityIfWithinBBox, 97 97 shiftHue, 98 + slugify, 98 99 srgbEncodeFromLinear, 99 100 sumByAttribute, 100 101 sumSeries, ··· 4883 4884 expect(createStepperPath(points)).toBe(''); 4884 4885 }); 4885 4886 }); 4887 + 4888 + describe('slugify', () => { 4889 + test('lowercases, trims and hyphenates ASCII text', () => { 4890 + expect(slugify(' Hello World ')).toBe('hello-world'); 4891 + expect(slugify('Hello World')).toBe('hello-world'); 4892 + }); 4893 + 4894 + test('keeps Unicode letters and numbers instead of dropping them', () => { 4895 + expect(slugify('日本語')).toBe('日本語'); 4896 + expect(slugify('한국어')).toBe('한국어'); 4897 + expect(slugify('Café')).toBe('café'); 4898 + expect(slugify('Ø2')).toBe('ø2'); 4899 + }); 4900 + 4901 + test('produces distinct ids for distinct non-ASCII labels', () => { 4902 + expect(slugify('日本')).not.toBe(slugify('한국')); 4903 + expect(slugify('Москва')).not.toBe(slugify('Київ')); 4904 + }); 4905 + 4906 + test('still removes punctuation and symbols', () => { 4907 + expect(slugify('a@b!c')).toBe('abc'); 4908 + expect(slugify('hot 🔥 take')).toBe('hot-take'); 4909 + }); 4910 + });