<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Janis Ievins on Medium]]></title>
        <description><![CDATA[Stories by Janis Ievins on Medium]]></description>
        <link>https://medium.com/@janis.ievins?source=rss-609dad7bec2c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xJT5G0DIJ-yfg-82</url>
            <title>Stories by Janis Ievins on Medium</title>
            <link>https://medium.com/@janis.ievins?source=rss-609dad7bec2c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 20:58:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@janis.ievins/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[React Native Deserves Better Charts. So We Built Them.]]></title>
            <link>https://medium.com/makit/react-native-deserves-better-charts-so-we-built-them-f427965e8102?source=rss-609dad7bec2c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f427965e8102</guid>
            <category><![CDATA[d3js]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[webview]]></category>
            <category><![CDATA[charts]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Janis Ievins]]></dc:creator>
            <pubDate>Fri, 16 Jan 2026 13:56:36 GMT</pubDate>
            <atom:updated>2026-01-16T13:56:36.063Z</atom:updated>
            <content:encoded><![CDATA[<p>We built <a href="https://github.com/mitigate-dev/react-native-d3-chart">react-native-d3-chart</a> to solve a problem that’s plagued React Native developers for years: rendering interactive, high-performance charts with large datasets. Most charting libraries choke on 100K+ data points, force you into rigid designs, or require building custom native modules. We wanted something that just works — beautiful D3-powered charts that handle massive datasets smoothly, with an API simple enough to set up in minutes, not weeks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQYbbdkd2lf5Z9iX5eR8Rg.gif" /></figure><h3>The Problem We Kept Seeing</h3><p>It started with a project requirement: we needed a performant chart rendering library that could handle large datasets in React Native. Sounds straightforward, right?</p><p>So we went looking. We searched npm packages, scoured GitHub issues, dove into StackOverflow threads and Reddit discussions. What we found wasn’t a solution — it was a graveyard of frustrated developers asking the same question: “How do I render performant charts with large datasets in React Native?”</p><p>The common complaints were consistent across dozens of threads:</p><ul><li>Native bridge libraries work fine until you throw 100K+ data points at them</li><li>Canvas-based solutions are fast but inflexible</li><li>WebView gets dismissed as “too slow”</li><li>Building custom D3 integrations is a nightmare of WebView communication and state management</li></ul><p>The usual responses? “Good enough” solutions that drop frames, workarounds that limit functionality, or suggestions to spend months building custom native modules.</p><p>But everywhere we looked, we kept seeing beautiful D3 examples in web development. <a href="https://d3js.org/">D3.js</a> is powerful, flexible, handles massive datasets beautifully. The problem? <strong>D3 is designed for browsers.</strong> It expects a DOM, a full JavaScript environment, SVG rendering. React Native has none of that natively.</p><p>There had to be a better way.</p><h3>The Journey to the Solution</h3><h4>First Attempt: Extract D3, Build SVGs Ourselves</h4><p>Our first instinct was to avoid WebView entirely. D3 is just JavaScript, right? We could extract the logic, get the data, and generate SVGs ourselves in React Native.</p><p>We started diving into D3’s internals. Scales, axes, transitions, zooming behavior — it quickly became clear this wasn’t just about drawing lines. The complexity was staggering. We’d be rebuilding half of D3 from scratch, reimplementing coordinate calculations, managing state for 100K data points, handling all the edge cases.</p><p>We realized this was going to take weeks, maybe months. The development time cost was too high. D3 is powerful <em>because</em> it’s running in a full JavaScript engine with a DOM. Trying to extract it and port it to React Native meant essentially reimplementing D3 itself — and D3 isn’t just a library, it’s practically a framework, a whole language for data visualization.</p><h4>The Crazy Idea That Worked</h4><p>We were stuck. Then we had a thought that felt wrong at first: “What if we just… used WebView?”</p><p>They say WebView is slow. But we weren’t trying to render the UI in WebView. We just needed to render charts — computation-heavy, graphics-intensive work that WebView actually excels at.</p><p>We set up a WebView, put D3 in it, and let it do what it was designed to do: render interactive SVGs. Then we just passed data in and pulled rendered charts out.</p><p>It worked. Better than we expected. Smooth. Responsive. Even with 100K data points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iswi2JV-mj8Kap5edkXw3Q.png" /></figure><p>And not just basic charts. All the hard stuff that makes developers avoid charting in React Native:</p><ul><li>Multiple datasets on one chart</li><li>Dynamic Y-axis scaling per dataset</li><li>Smooth zooming and panning</li><li>Handling gaps in data gracefully</li><li>Color-coded thresholds that change based on values</li><li>Background zones showing target ranges</li><li>Localized number and date formatting</li></ul><p>All of it. Just works.</p><h3>Why WebView Actually Makes Sense</h3><p>The insight wasn’t “WebView is fast.” The insight was: <strong>use the right tool for the job.</strong></p><p>D3’s home is a browser. It’s designed to run in an environment with a full JavaScript engine and a DOM. Trying to extract D3 and run it elsewhere is like taking a fish out of water.</p><p>Native rendering is great for UI. But for heavy computational work like chart rendering, a JavaScript engine with D3 is the right tool. Modern WebView JavaScript engines are seriously optimized. And SVG rendering is hardware-accelerated.</p><ul><li>D3 renders to an SVG, which is infinitely zoomable without re-rendering the entire canvas</li><li>All heavy computation (scaling, transitioning, path generation) happens in optimized JavaScript</li><li>React Native’s main thread stays free for animations, navigation, other interactions</li><li>The WebView JavaScript engine is seriously fast in modern devices</li></ul><p>Modern devices have JavaScript engines that are <em>faster</em> at certain computations than native code. For chart rendering, this is one of those cases.</p><h3>The Props API: Simplicity Was the Goal</h3><p>Once we had something that worked, we focused on making it simple. The goal: developers should be able to copy a working example and have it running in 5 minutes.</p><pre>&lt;Chart<br>  width={width}<br>  height={height}<br>  timeDomain={[start, end]}<br>  datasets={[{ points, color, unit }]}<br>/&gt;</pre><p>That’s genuinely all you need. Everything else is optional.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0ccWNqstjPOfLsdxoYhDw.png" /></figure><p>But under the hood? The library handles:</p><ul><li>Responsive sizing</li><li>Touch gestures (zoom, pan, drag)</li><li>Time zone handling</li><li>Locale-specific formatting</li><li>Data point optimization (rendering only visible points)</li></ul><h3>Color Thresholds Were the “Ah-Ha” Feature</h3><p>We kept hearing: “We need different colors based on values.” Most libraries force you to preprocess data or write custom renderers.</p><p>We thought: D3 already has threshold scales. Why make this hard?</p><pre>color: {<br>  type: &#39;thresholds&#39;,<br>  thresholds: [<br>    { value: 100, color: &#39;#FF0000&#39; },<br>    { value: 60, color: &#39;#FFA500&#39; },<br>  ]<br>}</pre><p>D3 handles the interpolation. We handle passing the right scale to D3. One line of configuration, powerful results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lEE1QigxmJRYblnM3_tp6g.png" /></figure><h3>The Performance Story Nobody Expected</h3><p>We had reasonable doubts about the 100K+ data point case. Because WebView can’t handle it, right?</p><p>Well, turns out it can!</p><p>The secret: D3’s path generation is optimized for exactly this. When you’re rendering to SVG, D3 doesn’t create 100K DOM nodes — it creates one &lt;path&gt; element with 100K coordinate pairs. SVG rendering is hardware-accelerated. The browser handles it brilliantly.</p><p>The real bottleneck? Serializing 100K points from React Native to the WebView. So we optimized that too: we send all the data to the WebView, but the sampling happens <em>in there</em>, on its own thread, separate from the React Native UI thread. Only visible points (plus a buffer) get rendered. The WebView’s JavaScript engine handles this without blocking your app’s animations or interactions. The user zooms out and sees all points? We recalculate the sample. Seamless.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9te6hQvqDS5eKNOZFZrCQ.png" /></figure><h3>Our Priority: Developer Experience</h3><p>We built react-native-d3-chart with one guiding principle: <strong>developer experience matters more than feature count.</strong></p><p>Good TypeScript types, working examples, sensible defaults, clear error messages — these aren’t nice-to-haves. They’re what make a library actually usable. We could add 50 configuration options, but instead we focused on making the common use case dead simple while keeping the advanced cases powerful and flexible.</p><h3>What’s Next</h3><p>We’re publishing react-native-d3-chart because it solved our problem, and we believe it can solve yours too. But we know this is just the beginning.</p><p>As developers start using the library in real projects, we’ll discover edge cases, performance bottlenecks, and missing features we haven’t thought of yet. That’s where you come in.</p><p>Our roadmap will be shaped by real-world usage:</p><ul><li>We’ll add configuration options that developers actually need</li><li>We’ll fix bugs and improve performance based on reported issues</li><li>We’ll enhance the API based on how people use it</li><li>We’ll stay lean and focused — no feature bloat</li></ul><h3>Try It, Break It, Tell Us About It</h3><p>We’re releasing this library into the wild. Here’s how you can help shape its future:</p><p><strong>Use it.</strong> Install the library, build something with it. If it works for you, great. If it doesn’t, that’s exactly what we need to know.</p><p><strong>Report issues.</strong> Found a bug? Performance issue? Unclear documentation? <a href="https://github.com/mitigate-dev/react-native-d3-chart/issues">Open an issue on GitHub</a>. Every issue helps us improve.</p><p><strong>Request features.</strong> Need a specific configuration option? A different chart type? Tell us what you’re trying to build and what’s missing.</p><p><strong>Contribute.</strong> The library is open source. If you’ve solved a problem or added a feature you need, submit a PR. We’ll review and merge contributions that align with the library’s goals.</p><p>The goal is simple: make React Native charting work the way it should. Let’s build this together.</p><p><em>The library is open source with full API docs, interactive demos, and working examples: </em><a href="https://github.com/mitigate-dev/react-native-d3-chart"><em>react-native-d3-chart</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f427965e8102" width="1" height="1" alt=""><hr><p><a href="https://medium.com/makit/react-native-deserves-better-charts-so-we-built-them-f427965e8102">React Native Deserves Better Charts. So We Built Them.</a> was originally published in <a href="https://medium.com/makit">Mitigate</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>