<?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 Suresh Mohan on Medium]]></title>
        <description><![CDATA[Stories by Suresh Mohan on Medium]]></description>
        <link>https://medium.com/@suresh-mohan?source=rss-b5518cc31eb8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*PnPDE664HSdnEKjDAT_H3w.jpeg</url>
            <title>Stories by Suresh Mohan on Medium</title>
            <link>https://medium.com/@suresh-mohan?source=rss-b5518cc31eb8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 23:01:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@suresh-mohan/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[Lazy Loading with React-An Overview]]></title>
            <link>https://medium.com/syncfusion/lazy-loading-with-react-an-overview-4126f7854745?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4126f7854745</guid>
            <category><![CDATA[lazy-loading]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Tue, 13 Sep 2022 11:45:55 GMT</pubDate>
            <atom:updated>2022-09-13T11:55:39.941Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*3cmkb_hRMUSd5ZOE29RqwQ@2x.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Lazy_loading">Lazy loading</a> is one of the most common design patterns used in web and mobile development. It is widely used with frameworks like <a href="https://angular.io/">Angular</a> and <a href="https://reactjs.org/">React</a> to increase an application’s performance by reducing initial loading time.</p><p>In the earlier versions of React, lazy loading was implemented using third-party libraries. However, React introduced two new native features to implement lazy loading with the React v16.6 update.</p><p>In this article, I will discuss what lazy loading is, how to implement it with React, and its pros and cons.</p><h3>What Is Lazy Loading?</h3><p>In simple terms, lazy loading is a design pattern. It allows you to load parts of your application on-demand to reduce the initial load time. For example, you can initially load the components and modules related to user login and registration. Then, you can load the rest of the components based on user navigation.</p><p>You might not feel much difference when using lazy loading for small-scale applications. But it significantly impacts large-scale applications by reducing the initial load time. Ultimately, it improves both the user experience and the application’s performance.</p><h3>Advantages of Lazy Loading</h3><ul><li>Reduces initial loading time by reducing the bundle size.</li><li>Reduces browser workload.</li><li>Improves application performance in low bandwidth situations.</li><li>Improves user experience at initial loading.</li><li>Optimizes resource usage.</li></ul><h3>Disadvantages of Lazy Loading</h3><ul><li>Not suitable for small-scale applications.</li><li>Placeholders can slow down quick scrolling.</li><li>Requires additional communication with the server to fetch resources.</li><li>Can affect SEO and ranking.</li></ul><h3>Implementing Lazy Loading with React</h3><p>Usually, lazy loading is not used in React applications, since we mostly use React to develop single-page applications. Developers can bundle the entire code as a single bundle and use it for deployments.</p><p>But, as the application gets complex, we need to consider performance and user experience. In such situations, we need to use the lazy-loading techniques available with React to bundle the critical and noncritical parts of the application separately.</p><p>You can use modern bundlers and transpilers like <a href="https://webpack.js.org/">Webpack</a> and <a href="https://babeljs.io/">Babel</a> to implement applications following the modular pattern. Then, you can use <a href="https://reactjs.org/docs/code-splitting.html">code splitting</a> to divide the application bundle into smaller ones and lazy load them.</p><p>React introduced two native features with the version 16.6 release to implement lazy loading in React applications. First, they use the power of code splitting and dynamic imports to allow developers to implement lazy loading for their applications easily.</p><p>So, let’s see how we can implement lazy loading in React.</p><h3>React.lazy()</h3><p><strong>React.lazy()</strong> allows developers to easily create components with dynamic imports and render them as normal components. When the component is rendered, it will automatically load the bundle that contains the rendered component.</p><p>You need to provide a single input parameter to call <strong>React.lazy()</strong>. It accepts a function as an input parameter, and that function should return a promise after loading the component using <strong>import()</strong>. Finally, the returned promise from <strong>React.lazy()</strong> will give you a module with a default export containing the React component.</p><p>The following code shows how to use the <strong>React.lazy()</strong> function.</p><pre>// Without React.lazy()<br>import AboutComponent from &#39;./AboutComponent &#39;;<br><br>// With React.lazy()<br>const AboutComponent = React.lazy(() =&gt; import(&#39;./AboutComponent &#39;));<br><br>const HomeComponent = () =&gt; (<br>    &lt;div&gt;&lt;AboutComponent /&gt;&lt;/div&gt;<br>)</pre><h3>React.Suspense</h3><p>When we use lazy loading, components are rendered as we navigate. So, we need to have a placeholder for those components until they are loaded. As a solution, <strong>React.Suspense</strong> was introduced, and it acts as a wrapper for the lazy components.</p><p>You can wrap a single lazy component, multiple lazy components, or multiple lazy components with different hierarchy levels with <strong>React.Suspense</strong>. In addition, it accepts a prop named fallback as the placeholder, and you can pass a component or an element for that.</p><p>For example, you can pass the waiting or loading message as the <strong>fallback</strong> prop, and it will be displayed until the wrapped lazy component is rendered.</p><pre>import React, { Suspense } from &quot;react&quot;;<br>const AboutComponent = React.lazy(() =&gt; import(&#39;./AboutComponent&#39;));<br><br>const HomeComponent = () =&gt; (<br>    &lt;div&gt;&lt;Suspense fallback = { &lt;div&gt; Please Wait... &lt;/div&gt; } &gt;<br>            &lt;AboutComponent /&gt;&lt;/Suspense&gt;&lt;/div&gt;<br>);</pre><p>As you can see, you need to use both the <strong>React.lazy()</strong> and <strong>React.Suspense</strong> features to build a lazy-loading component in React. These features are straightforward and anyone with basic React knowledge can easily use them.</p><p>However, sometimes you might face issues due to promise rejections in the <strong>React.lazy()</strong> function. To overcome such situations, you need to create a <a href="https://reactjs.org/docs/error-boundaries.html">React error boundary component</a> and wrap the Suspense components using it.</p><pre>import React, { Suspense } from &quot;react&quot;;<br>import ErrorBoundary from &quot;./error.boundary.js&quot;;<br>const AboutComponent = React.lazy(() =&gt; import(&#39;./AboutComponent&#39;));<br><br>const HomeComponent = () =&gt; (<br>    &lt;div&gt;&lt;ErrorBoundary&gt;<br>        &lt;Suspense fallback = { &lt;div&gt; Please Wait... &lt;/div&gt;} &gt;<br>          &lt;AboutComponent /&gt;&lt;/Suspense&gt;&lt;/ErrorBoundary&gt;<br>    &lt;/div&gt;<br>);</pre><h3>Don’t Use Too Much Lazy Loading</h3><p>As discussed, lazy loading has many benefits. But overusing it can have a significant negative impact on your applications. So, it is essential to understand when we should use lazy loading and when we should not.</p><p>You should not opt for lazy loading if your application has a small bundle size. There is no point in splitting a small bundle into pieces, and it will only increase coding and configuring effort.</p><p>Also, there are special application types like e-commerce sites that can be negative impacted by lazy loading. For example, users like to scroll through quickly when searching for items. If you lazy load shopping items, it will break the scrolling speed and result in a bad user experience. So, you should analyze the company’s website usage before using lazy loading.</p><p>On the other hand, lazy loading can be a real life-saver in large-scale projects. Projects with large bundle sizes take a significant amount of time for the initial load, and it is a significant drawback in terms of user experience. So, think of application requirements, scale, and current performance of the application before choosing lazy loading.</p><h3>Conclusion</h3><p>This article discussed what lazy loading is, how we can implement it in React, and the pros and cons we should know before using it. I hope this article helped you improve your knowledge of React lazy loading.</p><p>Thank you for reading.</p><p>The <a href="https://www.syncfusion.com/react-ui-components">Syncfusion Essential Studio for React</a> suite offers over 70 high-performance, lightweight, modular, and responsive UI components in a single package. It’s the only suite you’ll ever need to construct a complete app.</p><p>If you have questions, you can contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://support.syncfusion.com/">support portal</a>, or <a href="https://www.syncfusion.com/feedback">feedback portal</a>. We are always happy to assist you!</p><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/lazy-loading-with-react-an-overview.aspx"><em>https://www.syncfusion.com</em></a><em> on September 13, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4126f7854745" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/lazy-loading-with-react-an-overview-4126f7854745">Lazy Loading with React-An Overview</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Progress Bar in JavaScript Using a Linear Gauge]]></title>
            <link>https://medium.com/syncfusion/how-to-build-a-progress-bar-in-javascript-using-a-linear-gauge-37655d915b5a?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/37655d915b5a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 11:00:40 GMT</pubDate>
            <atom:updated>2022-03-17T12:51:31.265Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*G0JHnEmPdxDUH0PU1dLd8g@2x.png" /></figure><p>The Syncfusion <a href="https://www.syncfusion.com/javascript-ui-controls/js-linear-gauge">JavaScript Linear Gauge</a> control is primarily used to show gauge-ish values like temperatures, quantities, speed-numbers on a linear scale across a range. In this sample, we wanted to see if we could make a package delivery timeline or progress bar. The finished <a href="https://github.com/SyncfusionSE/TimeScale">sample</a> is in GitHub.</p><p>The following image shows a simple linear gauge from our <a href="https://ej2.syncfusion.com/angular/demos/#/bootstrap5/linear-gauge/axes">online samples</a>. The larger tick marks display values, and there is a pointer with a text label.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*NnSHwA-Nm84JoUrB.png" /></figure><p>This sample is mildly interesting, but it’s not quite right to indicate shipping status (the unit of measurement should be a percentage, at least). To fix it, we take advantage of the customizations allowed in the Syncfusion API.</p><p>In our <a href="https://github.com/SyncfusionSE/TimeScale">GitHub sample</a>, we made a basic shipping status bar, but it was a little boring. So, we put it on the bottom of the sample page (linear3) and led with more interesting options. Balloons are always fun, so we made the others with balloons!</p><p>We demonstrate different looks across the three gauges. Each gauge is linear with <strong>max = 150</strong> and <strong>min = 0</strong>. We defined four markers at <strong>0</strong>, <strong>50</strong>, <strong>100</strong>, and <strong>150</strong> to represent four stages. We used the <a href="https://ej2.syncfusion.com/documentation/linear-gauge/pointers/#marker-pointer">marker pointer</a> and took advantage of the color property to show finished, unfinished, and current values:</p><ul><li><strong>NotStarted</strong>: Stage has not been reached or started.</li><li><strong>Current</strong>: Where the package is located now.</li><li><strong>Finished</strong>: When the package has reached the destination.</li></ul><pre>public FinishedColor: string = &#39;#f2a92f&#39;; <br>public NotStartedColor: string = &#39;#eeeeee&#39;; <br>public CurrentActionColor: string = &#39;#79564e&#39;;</pre><p>To make the samples interactive, we added a numeric text box with a spinner. Users can change the value and see it reflected in the gauges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/0*oJa6A8RbrvmebSH4.png" /></figure><p>The <strong>numerictextbox</strong> change event calls the<strong> positionChange </strong>function. Changing these colors is how the users see progression. There are six cases in this function, and only four values on the gauge. Since we defined three colors for each marker ( <strong>NotStarted</strong>, <strong>Current</strong>, and <strong>Finished</strong>), we had to handle <strong>NotStarted</strong> and <strong>Finished</strong> for the first point and the last point, respectively.</p><pre>public positionChange(args: ChangeEventArgs) {<br>  switch (args.value) {<br>    case 0:<br>      this.updatePointerImage( this.NotStartedPointer, this.NotStartedPointer, this.NotStartedPointer, this.NotStartedPointer );<br>      this.updatePointerColor( this.NotStartedColor, this.NotStartedColor, this.NotStartedColor, this.NotStartedColor );<br>      this.updateRangeColor( this.NotStartedColor, this.NotStartedColor, this.NotStartedColor );<br>      break;<br>    case 1:<br>      this.updatePointerImage( this.CurrentActionPointer, this.NotStartedPointer, this.NotStartedPointer, this.NotStartedPointer );<br>      this.updatePointerColor( this.CurrentActionColor, this.NotStartedColor, this.NotStartedColor, this.NotStartedColor );<br>      this.updateRangeColor(this.NotStartedColor, this.NotStartedColor, this.NotStartedColor);<br>      break;<br>    case 2:<br>      this.updatePointerImage( this.FinishedPointer, this.CurrentActionPointer, this.NotStartedPointer, this.NotStartedPointer );<br>      this.updatePointerColor( this.FinishedColor, this.CurrentActionColor, this.NotStartedColor, this.NotStartedColor );<br>      this.updateRangeColor(this.FinishedColor, this.NotStartedColor, this.NotStartedColor);<br>      break;<br>    case 3:<br>      this.updatePointerImage( this.FinishedPointer, this.FinishedPointer, this.CurrentActionPointer, this.NotStartedPointer );<br>      this.updatePointerColor( this.FinishedColor, this.FinishedColor, this.CurrentActionColor, this.NotStartedColor );<br>      this.updateRangeColor(this.FinishedColor, this.FinishedColor, this.NotStartedColor);<br>      break;<br>    case 4:<br>      this.updatePointerImage(this.FinishedPointer, this.FinishedPointer, this.FinishedPointer, this.CurrentActionPointer );<br>      this.updatePointerColor(this.FinishedColor, this.FinishedColor, this.FinishedColor, this.CurrentActionColor );<br>      this.updateRangeColor(this.FinishedColor, this.FinishedColor, this.FinishedColor);<br>      break;<br>    case 5:<br>      this.updatePointerImage( this.FinishedPointer, this.FinishedPointer, this.FinishedPointer, this.FinishedPointer );<br>      this.updatePointerColor( this.FinishedColor, this.FinishedColor, this.FinishedColor, this.FinishedColor );<br>      this.updateRangeColor(this.FinishedColor, this.FinishedColor, this.FinishedColor);<br>      break;<br>    default:<br>      break;<br>  }<br>}</pre><p>The default axis labels are numbers. This makes sense, as a gauge is meant to show numbers. We took the <a href="https://ej2.syncfusion.com/documentation/api/linear-gauge/iAxisLabelRenderEventArgs/">render event for the axis labels</a> and used it to change the labels to text.</p><pre>//Provides label name for each stage<br>public axisLabelRender(args: IAxisLabelRenderEventArgs):void {<br>  if (args.value === 0) {<br>    args.text = &#39;Stage 1&#39;;<br>  } else if (args.value === 50) {<br>    args.text = &#39;Stage 2&#39;;<br>  } else if (args.value === 100) {<br>    args.text = &#39;Stage 3&#39;;<br>  } else if (args.value === 150) {<br>    args.text = &#39;Stage 4&#39;;<br>  } else {<br>      //prevents rendering of default label for second axis<br>    args.cancel = true;<br>  }<br>}</pre><pre>&lt;ejs-lineargauge id=&quot;linear1&quot; #gauge1 height=&quot;200px&quot; title=&quot;Stage Progression&quot; orientation=&quot;Horizontal&quot;<br>      (axisLabelRender)=&quot;axisLabelRender($event)&quot;&gt;</pre><h3>First gauge</h3><p>Since the Linear Gauge control can have multiple axes, we created a second one to make the balloons float above the gauge. This lets us keep the first axis as circles with checks. You are free to put markers anywhere on this axis you wish; we just chose to keep them synchronized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/0*jGEkW8upBEq35LyG.png" /></figure><pre>&lt;!-- second axis to add images in the UI for each stage--&gt;<br>&lt;e-axis minimum=&quot;200&quot; maximum=&quot;350&quot; [line]=&#39;axisline&#39; [minorTicks]=&quot;minorTick&quot; [majorTicks]=&quot;majorTick&quot;&gt;<br>    &lt;e-pointers&gt;<br>        &lt;e-pointer type=&quot;Marker&quot; markerType=&quot;Image&quot; value=&quot;200&quot; offset=&quot;-10&quot; [imageUrl]=&quot;Stage1&quot; height=50 width=50&gt;<br>        &lt;/e-pointer&gt;<br>        &lt;e-pointer type=&quot;Marker&quot; markerType=&quot;Image&quot; value=&quot;250&quot; offset=&quot;-10&quot; [imageUrl]=&quot;Stage2&quot; height=50 width=50&gt;<br>        &lt;/e-pointer&gt;<br>        &lt;e-pointer type=&quot;Marker&quot; markerType=&quot;Image&quot; value=&quot;300&quot; offset=&quot;-10&quot; [imageUrl]=&quot;Stage3&quot; height=50 width=50&gt;<br>        &lt;/e-pointer&gt;<br>        &lt;e-pointer type=&quot;Marker&quot; markerType=&quot;Image&quot; value=&quot;350&quot; offset=&quot;-10&quot; [imageUrl]=&quot;Stage4&quot; height=50 width=50&gt;<br>        &lt;/e-pointer&gt;<br>    &lt;/e-pointers&gt;<br>&lt;/e-axis&gt;</pre><h3>Second gauge</h3><p>We set the markers to be images and put balloons on them, using only one axis. These balloons could have been offset, but then the gauge wouldn’t be a flat line. You can play with the sample to make this happen though.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/0*Njr4z-VKsH4WZ-ny.png" /></figure><pre>&lt;e-pointers&gt;<br>    &lt;e-pointer type=&quot;Marker&quot; markerType=&quot;Image&quot; value=&quot;0&quot; [imageUrl]=&quot;Stage1&quot; height=30 width=30&gt;&lt;/e-pointer&gt;<br>    &lt;e-pointer type=&quot;Marker&quot; markerType=&quot;Image&quot; value=&quot;50&quot; [imageUrl]=&quot;Stage2&quot; height=30 width=30&gt;&lt;/e-pointer&gt;<br>    &lt;e-pointer type=&quot;Marker&quot; markerType=&quot;Image&quot; value=&quot;100&quot; [imageUrl]=&quot;Stage3&quot; height=30 width=30&gt;&lt;/e-pointer&gt;<br>    &lt;e-pointer type=&quot;Marker&quot; markerType=&quot;Image&quot; value=&quot;150&quot; [imageUrl]=&quot;Stage4&quot; height=30 width=30&gt;&lt;/e-pointer&gt;<br>&lt;/e-pointers&gt;</pre><h3>Third gauge</h3><p>Here is the actual shipping status progress bar. We decided not to show a marker for the point value 100 (the third stage). This gives the idea of the package being in transit with no particular location defined. We also changed the stage names so that they made sense.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/0*qpNplLRGI5a5hF2g.png" /></figure><p>This is a simple example of how one Syncfusion control can be customized. We put a lot of effort into making our controls flexible. If you have any questions about how to create a control, ask us in the comment section below or through our <a href="https://www.syncfusion.com/forums">support forums</a>, <a href="https://support.syncfusion.com/">support portal</a>, or <a href="https://www.syncfusion.com/feedback/">feedback portal</a>. We may be able to create a sample. This is how we grow our suite of products. We look forward to your suggestions!</p><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/how-to-build-a-progress-bar-in-javascript-using-a-linear-gauge.aspx"><em>https://www.syncfusion.com</em></a><em> on March 17, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37655d915b5a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/how-to-build-a-progress-bar-in-javascript-using-a-linear-gauge-37655d915b5a">How to Build a Progress Bar in JavaScript Using a Linear Gauge</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Replicating a Fashion UI in Xamarin.Forms]]></title>
            <link>https://suresh-mohan.medium.com/replicating-a-fashion-ui-in-xamarin-forms-ce14cd55714?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce14cd55714</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 10:30:43 GMT</pubDate>
            <atom:updated>2022-03-17T12:41:26.985Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*zMeqEU2PDe4M4e8HgqI94Q@2x.png" /></figure><p>Howdy! In this blog post, we are going to replicate a fashion app UI based on this <a href="https://dribbble.com/shots/15929861-Fashion-Mobile-App">Dribbble design</a>.</p><p>Our UI contains two screens: fashion details and cart. We are going to develop the UI based on the steps specified in this image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*19LMnA7J-wEExCZ7Xsp6TA.png" /></figure><p>Before starting, I’d like to establish the specific points that we will be learning:</p><ul><li>You will continue to enhance your XAML skills.</li><li>You are going to implement Syncfusion Xamarin.Forms controls such as <a href="https://www.syncfusion.com/xamarin-ui-controls/xamarin-button">Button</a> and <a href="https://www.syncfusion.com/xamarin-ui-controls/xamarin-numericupdown">NumericUpDown</a>.</li></ul><p>Let’s code!</p><h3>Step 1: Main picture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/0*2aqae-1-7KcBSih7.png" /></figure><p>First, let’s work on the main layout structure of the fashion details page. Here, we are going to use the DataGrid component.</p><p>For a better understanding of how to use the DataGrid, refer to the blog <a href="https://www.syncfusion.com/blogs/post/5-tips-to-easily-use-the-grid-for-layouts-in-xamarin-forms.aspx"><strong>5 Tips to Easily Use the Grid for Layouts in Xamarin.Forms</strong></a>.</p><p>Refer to the following code example:</p><pre>&lt;!-- Main layout--&gt; <br>&lt;Grid RowDefinitions=&quot;*,*&quot; &gt; <br>&lt;!-- You must write here what is explained in steps 1.1 and 2 --&gt; <br>&lt;/Grid&gt;</pre><p>Now, as a next step 1.1, add the main image that makes up our UI. Refer to the following code example.</p><pre>&lt;!-- Main picture--&gt; <br>&lt;Image Grid.Row=&quot;0&quot; VerticalOptions=&quot;Start&quot; Source=&quot;Model01&quot;/&gt; <br>&lt;!-- You must write here what is explained in step 2 --&gt;</pre><h3>Step 2: Picture information</h3><p>Let’s design the frame information block. We will use a set of controls to present the required information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/0*WRwkhOHu5QmceEdc.png" /></figure><h3>Frame</h3><p>To present the container for detailed information, we will use a <strong>Frame</strong> and slightly overlap the Frame on the image using the <strong>Margin</strong> property.</p><p>Refer to the following code example.</p><pre>&lt;!-- Picture information--&gt; <br>&lt;Frame Grid.Row=&quot;1&quot; Background=&quot;White&quot; Margin=&quot;0,-30,0,0&quot; HasShadow=&quot;False&quot; CornerRadius=&quot;50&quot; VerticalOptions=&quot;FillAndExpand&quot;&gt; <br>&lt;Grid RowDefinitions=&quot;Auto,Auto,Auto,Auto,Auto&quot; ColumnDefinitions=&quot;*,Auto&quot; Padding=&quot;20&quot;&gt; <br>&lt;!-- You must write here what is explained in the next section --&gt;<br>&lt;/Grid&gt;<br>&lt;/Frame&gt;</pre><h3>Labels</h3><p>Then, we design the <strong>Labels</strong> to show information such as title, price, description, and size.</p><p>Refer to the following code example.</p><pre>&lt;!-- Title --&gt; <br>&lt;Label Grid.Row=&quot;0&quot; Grid.Column=&quot;0&quot; Text=&quot;Professional Black Blazer&quot; FontAttributes=&quot;Bold&quot; FontSize=&quot;23&quot;/&gt; <br>&lt;!-- Price--&gt; <br>&lt;Label Grid.Row=&quot;0&quot; Grid.Column=&quot;1&quot; Text=&quot;$210&quot; FontAttributes=&quot;Bold&quot; FontSize=&quot;23&quot; TextColor=&quot;#fb9c2c&quot;/&gt; <br>&lt;!-- Description--&gt; <br>&lt;Label Grid.Row=&quot;1&quot; Grid.Column=&quot;0&quot; Grid.ColumnSpan=&quot;2&quot; LineHeight=&quot;1.5&quot; TextColor=&quot;Silver&quot; Margin=&quot;0,15&quot; Text=&quot;Lorem ipsum dolor sit amet, consecteur adpiscing elit. Tempor ut pharetra ultrices pulvinar nec nnisi, gravida sed matts. Portitor sit.&quot;/&gt; <br>&lt;!-- Size Title--&gt; <br>&lt;Label Grid.Row=&quot;2&quot; Grid.Column=&quot;0&quot; Text=&quot;Size&quot; FontAttributes=&quot;Bold&quot; FontSize=&quot;18&quot;/&gt; <br>&lt;!-- You must write here what is explained in the next section --&gt;</pre><h3>CollectionView</h3><p>To continue with the sizes, we have a set of information that should be displayed as a list. For this, use the <strong>CollectionView</strong> to create a single design. We can replicate this design to represent as many records as we have in the source.</p><p>We have four sizes-S, M, L, and XL-so the button will be painted four times automatically.</p><p>Refer to the following code example.</p><pre>&lt;!-- Size options--&gt; <br>&lt;CollectionView Grid.Row=&quot;3&quot; Grid.Column=&quot;0&quot; Grid.ColumnSpan=&quot;2&quot; Margin=&quot;0,10,0,20&quot; HorizontalScrollBarVisibility=&quot;Never&quot; ItemsSource=&quot;{Binding sizes}&quot; ItemsLayout=&quot;HorizontalList&quot; HeightRequest=&quot;60&quot;&gt; <br>&lt;CollectionView.ItemTemplate&gt; <br>&lt;DataTemplate&gt; <br>&lt;StackLayout Padding=&quot;0,0,20,0&quot;&gt; <br>&lt;buttons:SfButton Text=&quot;{Binding SizeDescripcion}&quot; WidthRequest=&quot;40&quot; HeightRequest=&#39;40&#39; HorizontalOptions=&quot;StartAndExpand&quot; BackgroundColor=&quot;Transparent&quot; BorderColor=&quot;#898989&quot; TextColor=&quot;#898989&quot; CornerRadius=&quot;10&quot; BorderWidth=&quot;1&quot;/&gt; <br>&lt;/StackLayout&gt; <br>&lt;/DataTemplate&gt; <br>&lt;/CollectionView.ItemTemplate&gt; <br>&lt;/CollectionView&gt; <br>&lt;!-- You must write here what is explained in the next section --&gt;</pre><h3>Button</h3><p>Then, add the <strong>Move to Cart</strong> button using the Syncfusion <a href="https://www.syncfusion.com/xamarin-ui-controls/xamarin-button">Xamarin.Forms Button</a>.</p><p>For more details, refer to the <a href="https://help.syncfusion.com/xamarin/button/gettingstarted">Getting Started with Xamarin.Forms Button (SfButton)</a> documentation.</p><p>Refer to the following code example.</p><pre>&lt;!-- Move to cart button--&gt; <br>&lt;buttons:SfButton Grid.Row=&quot;4&quot; Grid.Column=&quot;0&quot; Grid.ColumnSpan=&quot;2&quot; BackgroundColor=&quot;#fb9c2c&quot; TextColor=&quot;White&quot; FontAttributes=&quot;Bold&quot; CornerRadius=&quot;20&quot; HeightRequest=&quot;60&quot; FontSize=&quot;17&quot; Text=&quot;Move to cart&quot; /&gt;</pre><p>We have finished the construction of our first screen! Let’s focus on the second screen!</p><h3>Step 3: Cart</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/0*91BcncqCd3qStad_.png" /></figure><p>Let’s design the <strong>Cart</strong> page. Like the first screen, we are going to use the Grid component to design the main layout of the Cart page. This is followed by adding the main Label.</p><p>Refer to the following code example.</p><pre>&lt;!-- Main Layout--&gt; <br>&lt;Grid RowDefinitions=&quot;Auto,Auto,Auto,Auto,Auto,Auto,Auto&quot; ColumnDefinitions=&quot;*,Auto&quot; RowSpacing=&quot;20&quot; Margin=&quot;30,70,30,10&quot;&gt; <br>&lt;!-- Cart main label--&gt; <br>&lt;Label Grid.Row=&quot;0&quot; Grid.Column=&quot;0&quot; Grid.ColumnSpan=&quot;2&quot; Text=&quot;Cart&quot; FontSize=&quot;20&quot; HorizontalTextAlignment=&quot;Center&quot; FontAttributes=&quot;Bold&quot;/&gt; <br>&lt;!-- You must write here what is explained in the next section --&gt; <br>&lt;/Grid&gt;</pre><h3>CollectionView</h3><p>Let’s display the list of items added to the cart using the CollectionView.</p><p>Inside this, add the set of labels and images required to present the cart details.</p><pre>&lt;!-- Cart information--&gt; <br>&lt;CollectionView Grid.Row=&quot;1&quot; Grid.Column=&quot;0&quot; Grid.ColumnSpan=&quot;2&quot; HorizontalScrollBarVisibility=&quot;Never&quot; Margin=&quot;0,20,0,0&quot; ItemsSource=&quot;{Binding CartDetails}&quot; HeightRequest=&quot;480&quot;&gt; <br>&lt;CollectionView.ItemTemplate&gt; <br>&lt;DataTemplate&gt; <br>&lt;Grid RowDefinitions=&quot;Auto,Auto,Auto&quot; ColumnDefinitions=&quot;Auto,*,Auto&quot; RowSpacing=&quot;20&quot; Padding=&quot;0,0,10,0&quot; Margin=&quot;0,0,0,30&quot;&gt; <br>&lt;!-- Rounded image--&gt; <br>&lt;Frame Grid.Row=&quot;0&quot; Grid.Column=&quot;0&quot; Grid.RowSpan=&quot;3&quot; Padding=&quot;0,0,10,0&quot; WidthRequest=&quot;110&quot; HeightRequest=&quot;110&quot; VerticalOptions=&quot;FillAndExpand&quot; HorizontalOptions=&quot;Start&quot; HasShadow=&quot;False&quot; IsClippedToBounds=&quot;True&quot; CornerRadius=&quot;20&quot; &gt; <br>&lt;Image Source=&quot;{Binding Picture}&quot; Aspect=&quot;AspectFill&quot; /&gt; <br>&lt;/Frame&gt; <br>&lt;!-- Article name--&gt; <br>&lt;Label Grid.Row=&quot;0&quot; Grid.Column=&quot;1&quot; Text=&quot;{Binding Name}&quot; FontSize=&quot;18&quot; FontAttributes=&quot;Bold&quot;/&gt; <br>&lt;!-- Article size--&gt; <br>&lt;Button Grid.Row=&quot;0&quot; Grid.Column=&quot;2&quot; Text=&quot;{Binding Size}&quot; HorizontalOptions=&quot;End&quot; BorderColor=&quot;#828282&quot; TextColor=&quot;#828282&quot; FontSize=&quot;15&quot; CornerRadius=&quot;6&quot; HeightRequest=&quot;28&quot; WidthRequest=&quot;28&quot; BorderWidth=&quot;1&quot; /&gt; <br>&lt;!-- Article price--&gt; <br>&lt;Label Grid.Row=&quot;1&quot; Grid.Column=&quot;1&quot; Text=&quot;{Binding Price}&quot; FontAttributes=&quot;Bold&quot; FontSize=&quot;18&quot; TextColor=&quot;#fb9c2c&quot;/&gt; <br>&lt;!-- You must write here what is explained in the next section --&gt; <br>&lt;/Grid&gt; <br>&lt;/DataTemplate&gt; <br>&lt;/CollectionView.ItemTemplate&gt; <br>&lt;/CollectionView&gt;</pre><h3>NumericUpDown</h3><p>Now, add the Syncfusion <a href="https://www.syncfusion.com/xamarin-ui-controls/xamarin-numericupdown">Xamarin.Forms NumericUpDown</a> control to replicate the <strong>counter</strong> for each item in the cart and display the pricing details.</p><p>For more details, refer to the <a href="https://help.syncfusion.com/xamarin/numericupdown/getting-started">Getting Started with Xamarin.Forms NumericUpDown</a> documentation.</p><p>Refer to the following code example.</p><pre>&lt;!-- Article counter - Syncfusion&#39;s NumericUpDown control--&gt; <br>&lt;updown:SfNumericUpDown x:Name=&quot;upDown&quot; Grid.Row=&quot;2&quot; Grid.Column=&quot;1&quot; BorderColor=&quot;Transparent&quot; Margin=&quot;0,0,50,0&quot; SpinButtonAlignment=&quot;Both&quot; TextAlignment=&quot;Center&quot;&gt; <br>&lt;updown:SfNumericUpDown.IncrementButtonSettings&gt; <br>&lt;updown:UpDownButtonSettings ButtonImage=&quot;More&quot; ButtonHeight=&quot;40&quot; ButtonWidth=&quot;40&quot; /&gt; <br>&lt;/updown:SfNumericUpDown.IncrementButtonSettings&gt; &lt;updown:SfNumericUpDown.DecrementButtonSettings&gt; &lt;updown:UpDownButtonSettings ButtonImage=&quot;Less&quot; ButtonHeight=&quot;40&quot; ButtonWidth=&quot;40&quot; /&gt; &lt;/updown:SfNumericUpDown.DecrementButtonSettings&gt; &lt;/updown:SfNumericUpDown&gt;</pre><h3>Step 4: Cart details</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/0*h3cO8ZsBeiPQBSRA.png" /></figure><p>Finally, include the labels and the <strong>Checkout</strong> button to display the final details of the total amount counted.</p><p>Refer to the following code example.</p><pre>&lt;!-- Article pricing--&gt; <br>&lt;Label Grid.Row=&quot;2&quot; Grid.Column=&quot;0&quot; Text=&quot;Subtotal:&quot; TextColor=&quot;#828282&quot; FontAttributes=&quot;Bold&quot;/&gt; <br>&lt;Label Grid.Row=&quot;2&quot; Grid.Column=&quot;1&quot; Text=&quot;$280&quot; FontSize=&quot;25&quot; HorizontalTextAlignment=&quot;End&quot; FontAttributes=&quot;Bold&quot;/&gt; <br>&lt;Label Grid.Row=&quot;3&quot; Grid.Column=&quot;0&quot; Text=&quot;Shipping:&quot; FontSize=&quot;20&quot; TextColor=&quot;#828282&quot; FontAttributes=&quot;Bold&quot;/&gt; <br>&lt;Label Grid.Row=&quot;3&quot; Grid.Column=&quot;1&quot; Text=&quot;$5&quot; FontSize=&quot;25&quot; HorizontalTextAlignment=&quot;End&quot; FontAttributes=&quot;Bold&quot;/&gt; <br>&lt;!-- Divisor line--&gt; <br>&lt;Line Grid.Row=&quot;4&quot; Grid.Column=&quot;0&quot; Grid.ColumnSpan=&quot;2&quot; HorizontalOptions=&quot;Center&quot; StrokeDashArray=&quot;1,7&quot; X2=&quot;320&quot; StrokeLineCap=&quot;Square&quot; Stroke=&quot;Silver&quot; StrokeThickness=&quot;2&quot;/&gt; <br>&lt;Label Grid.Row=&quot;5&quot; Grid.Column=&quot;0&quot; Text=&quot;Total Price&quot; TextColor=&quot;#828282&quot; FontSize=&quot;15&quot; FontAttributes=&quot;Bold&quot;/&gt; <br>&lt;Label Grid.Row=&quot;6&quot; Grid.Column=&quot;0&quot; Text=&quot;$285&quot; FontSize=&quot;25&quot; FontAttributes=&quot;Bold&quot;/&gt; <br>&lt;buttons:SfButton Grid.Row=&quot;5&quot; Grid.RowSpan=&quot;2&quot; Grid.Column=&quot;1&quot; BackgroundColor=&quot;#fb9c2c&quot; TextColor=&quot;White&quot; FontAttributes=&quot;Bold&quot; CornerRadius=&quot;20&quot; HeightRequest=&quot;60&quot; FontSize=&quot;17&quot; Text=&quot;Checkout&quot; WidthRequest=&quot;220&quot;/&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v_dUp24nvXPrBVIxTze_dw.png" /></figure><p>And our UI is done! Now you can see the full screens we have built.</p><h3>GitHub reference</h3><p>You can check out our full example of <a href="https://github.com/SyncfusionExamples/fashion-mobile-app-ui-in-xamarin">replicating a fashion app UI in Xamarin.Forms on GitHub</a>.</p><h3>Conclusion</h3><p>Thanks for reading! In this blog, we have seen how to replicate a fashion app UI using Syncfusion Xamarin.Forms UI controls. Try it out and leave your feedback in the comments section below.</p><p>Syncfusion’s <a href="https://www.syncfusion.com/xamarin-ui-controls">Xamarin</a> suite offers over 150 UI controls, from basic editors to powerful, advanced controls like <a href="https://www.syncfusion.com/xamarin-ui-controls/xamarin-charts">Charts</a>, <a href="https://www.syncfusion.com/xamarin-ui-controls/xamarin-listview">ListView</a>, and <a href="https://www.syncfusion.com/xamarin-ui-controls/xamarin-rich-text-editor">Rich Text Editor</a>. Use them to build elite applications!</p><p>You can contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://support.syncfusion.com/">support portal</a>, or <a href="https://www.syncfusion.com/feedback/xamarin-forms">feedback portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/replicating-an-app-login-screen-in-xamarin-forms.aspx">Replicating an App Login Screen in Xamarin.Forms</a></li><li><a href="https://www.syncfusion.com/blogs/post/create-a-wizard-view-in-xamarin-forms.aspx">Create a Wizard View in Xamarin.Forms: A Novice’s Guide</a></li><li><a href="https://www.syncfusion.com/blogs/post/replicating-a-drink-and-food-menu-ui-in-xamarin-forms.aspx">Replicating a Drink and Food Menu UI in Xamarin.Forms</a></li><li><a href="https://www.syncfusion.com/blogs/post/replicating-banking-exploration-ui-in-xamarin.aspx">Replicating Banking Exploration UI in Xamarin</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/replicating-a-fashion-ui-in-xamarin-forms.aspx"><em>https://www.syncfusion.com</em></a><em> on March 17, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce14cd55714" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Features of WinUI Circular Charts That Make It Appealing]]></title>
            <link>https://medium.com/syncfusion/10-features-of-winui-circular-charts-that-make-it-appealing-6e581f4a5fbb?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e581f4a5fbb</guid>
            <category><![CDATA[charts]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[winui]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Wed, 15 Dec 2021 11:18:57 GMT</pubDate>
            <atom:updated>2021-12-15T13:09:45.928Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*hbkfGcuJTJFKF6Xy5Y3PPg@2x.png" /></figure><p>When it comes to data analysis and presentation, nothing beats a good chart. Charts visualize complex data in an easily understandable way. The Syncfusion <a href="https://www.syncfusion.com/winui-controls/charts">WinUI Charts </a>control provides over 20 popular and widely used chart types, like <a href="https://www.syncfusion.com/winui-controls/charts/winui-line-chart">line</a>, <a href="https://www.syncfusion.com/winui-controls/charts/winui-column-chart">column</a>, <a href="https://www.syncfusion.com/winui-controls/charts/winui-area-chart">area</a>, and <a href="https://www.syncfusion.com/winui-controls/charts/2d-chart-types#circular-charts">circular</a>. Its rich feature set includes data binding, multiple axes, legends, animations, data labels, tooltip, gradient, zooming, and so on.</p><p>First, let’s do a quick overview of our WinUI circular charts.</p><h3>WinUI circular charts</h3><p>The <a href="https://www.syncfusion.com/winui-controls/charts/2d-chart-types#circular-charts">WinUI circular charts</a> are user-friendly chart types that provide better UI visualization of data. These charts are classified into two types: <a href="https://www.syncfusion.com/winui-controls/charts/winui-pie-chart">pie charts</a> and <a href="https://www.syncfusion.com/winui-controls/charts/winui-doughnut-chart">doughnut charts</a> (also spelled donut).</p><h3>Pie chart</h3><p>The WinUI pie chart displays the proportions and percentages of different categories.</p><figure><img alt="WinUI Pie Chart" src="https://cdn-images-1.medium.com/max/869/1*jBSfAqd4YEhDx6O5Zef4PQ.png" /><figcaption>WinUI Pie Chart</figcaption></figure><p>To render a pie chart, create an instance of the <a href="https://help.syncfusion.com/cr/WinUI/Syncfusion.UI.Xaml.Charts.PieSeries.html">PieSeries</a> and add it to the series collection property of the <a href="https://help.syncfusion.com/cr/WinUI/Syncfusion.UI.Xaml.Charts.SfCircularChart.html">SfCircularChart</a>.</p><p>Refer to the following XAML code.</p><pre>&lt;chart:SfCircularChart&gt; &lt;chart:SfCircularChart.Series&gt; &lt;chart:PieSeries ItemsSource=&quot;{Binding Data}&quot; XBindingPath=&quot;Category&quot; YBindingPath=&quot;Value&quot;/&gt; &lt;/chart:SfCircularChart.Series&gt; &lt;/chart:SfCircularChart&gt;</pre><h3>Doughnut chart</h3><p>The WinUI doughnut chart is similar to the pie chart, but with an open space at the center. It is intended for comparing the contribution of each data point to the whole.</p><figure><img alt="WinUI Doughnut Chart" src="https://cdn-images-1.medium.com/max/496/1*0fr3gSkkwjKACftW39qD3A.png" /><figcaption>WinUI Doughnut Chart</figcaption></figure><p>To render a doughnut chart, create an instance of the <a href="https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Charts.DoughnutSeries.html">DoughnutSeries</a> and add it to the <a href="https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Charts.SfCircularChart.html#Syncfusion_UI_Xaml_Charts_SfCircularChart_Series">Series</a> collection property of the <a href="https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Charts.SfCircularChart.html">SfCircularChart</a>. Refer to the following XAML code.</p><pre>&lt;chart:SfCircularChart&gt; &lt;chart:SfCircularChart.Series&gt; &lt;chart:DoughnutSeries ItemsSource=&quot;{Binding Data}&quot; XBindingPath=&quot;Product&quot; YBindingPath=&quot;SalesRate&quot; /&gt; &lt;/chart:SfCircularChart.Series&gt; &lt;/chart:SfCircularChart&gt;</pre><p>Now, let’s explore the top 10 features of these WinUI circular charts:</p><h3>1. Legend</h3><p>A <a href="https://help.syncfusion.com/winui/circular-charts/legend">legend</a> provides additional information that helps us to identify the individual slices in a circular chart.</p><p>It supports the following options:</p><ul><li>Placement of legend on top, left, right, bottom, and inside the chart area.</li><li>Vertical or horizontal orientation.</li><li>Auto-creation of legend UI and binding to the underlying data model.</li><li>APIs to customize the default UI appearance.</li><li>Templating of legend items.</li></ul><p>You can define legends in your WinUI Charts using the following code example.</p><pre>&lt;chart:SfCircularChart&gt; &lt;chart:SfCircularChart.Legend&gt; &lt;chart:ChartLegend /&gt; &lt;/chart:SfCircularChart.Legend&gt; &lt;/chart:SfChart&gt;</pre><figure><img alt="Legends in WinUI Pie Chart" src="https://cdn-images-1.medium.com/max/936/1*kNBcJKDeIZsKAkCJm6bVhA.png" /><figcaption>Legends in WinUI Pie Chart</figcaption></figure><h3>2. Multilevel circular chart</h3><p>A <a href="https://help.syncfusion.com/winui/circular-charts/doughnutchart#multiple-doughnut">multilevel circular chart</a> allows users to add multiple series in a single chart. Usually, the donut chart has different categories of data slices. A multilevel donut chart is used to compare the distribution of category values.</p><p>Refer to the following XAML code example.</p><pre>&lt;chart:SfCircularChart&gt; &lt;chart:SfCircularChart.Series&gt; &lt;chart:DoughnutSeries ItemsSource=&quot;{Binding Data}&quot; XBindingPath=&quot;Category&quot; YBindingPath=&quot;Value1&quot;/&gt; &lt;chart:DoughnutSeries ItemsSource=&quot;{Binding Data}&quot; XBindingPath=&quot;Category&quot; YBindingPath=&quot;Value2&quot;/&gt; &lt;chart:DoughnutSeries ItemsSource=&quot;{Binding Data}&quot; XBindingPath=&quot;Category&quot; YBindingPath=&quot;Value2&quot;/&gt; &lt;/chart:SfCircularChart.Series&gt; &lt;/chart:SfCircularChart &gt;</pre><figure><img alt="WinUI Multilevel Donut Chart" src="https://cdn-images-1.medium.com/max/836/1*72gCBEkkyXF97HRarr_xCg.png" /><figcaption>WinUI Multilevel Donut Chart</figcaption></figure><h3>3. Semicircular chart</h3><p>The main advantage of the semicircle chart is that it takes up half the space of a regular circular chart for the same amount of data displayed. The semi-doughnut chart is also known as a half doughnut chart.</p><figure><img alt="WinUI Semi-Doughnut Chart" src="https://cdn-images-1.medium.com/max/838/1*g4N_kLY_g9Yf5yVnquGH9g.png" /><figcaption>WinUI Semi-Doughnut Chart</figcaption></figure><p><strong>Note:</strong> For more details, refer to the <a href="https://help.syncfusion.com/winui/circular-charts/piechart#semi-pie">WinUI Semi-Pie Chart</a> and <a href="https://help.syncfusion.com/winui/circular-charts/doughnutchart#semi-doughnut">Semi-Doughnut Chart documentation</a>.</p><h3>4. Exploded segments</h3><p>An <a href="https://help.syncfusion.com/winui/circular-charts/explode">exploded segment in a circular chart</a> is used to pull attention to a specific slice of the chart. You can change the explosion setting for all slices or specific slices. This can be done either programmatically or through user interaction.</p><figure><img alt="Exploded Segment in WinUI Pie Chart" src="https://cdn-images-1.medium.com/max/806/1*1p8o0lNUoG-e5V9Z7K-wYQ.png" /><figcaption>Exploded Segment in WinUI Pie Chart</figcaption></figure><h3>5. Grouping small data points into others category</h3><p>A chart with a large number of segments can be challenging to decipher. Also, it is difficult to see the smaller segments and apply appropriate colors to distinguish all the segments.</p><p>In this scenario, you can <a href="https://help.syncfusion.com/winui/circular-charts/piechart#group-small-data-points-into-others">group smaller segments into a single <strong>other</strong> segment</a>. We can easily achieve this using the <a href="https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Charts.CircularSeries.html#Syncfusion_UI_Xaml_Charts_CircularSeries_GroupTo">GroupTo</a> and <a href="https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Charts.CircularSeries.html#Syncfusion_UI_Xaml_Charts_CircularSeries_GroupMode">GroupMode</a> properties.</p><figure><img alt="Grouping Data Points in WinUI Doughnut Chart" src="https://cdn-images-1.medium.com/max/1024/1*O98IQEj_Bm-6Dw9GtOdL2g.png" /><figcaption>Grouping Data Points in WinUI Doughnut Chart</figcaption></figure><h3>6. Smart data labels</h3><p>In our WinUI circular charts, you can smartly arrange <a href="https://help.syncfusion.com/winui/circular-charts/datalabels#position">data labels</a> to avoid overlapping when the data points fall close together.</p><figure><img alt="Smart Data Label Support in WinUI Doughnut Chart" src="https://cdn-images-1.medium.com/max/1024/1*10g_XJyt5a88OCE6538hhA.png" /><figcaption>Smart Data Label Support in WinUI Doughnut Chart</figcaption></figure><h3>7. Tooltip</h3><p>The <a href="https://help.syncfusion.com/winui/circular-charts/tooltip">tooltip</a> displays a pop-up with additional information when the mouse hovers over a data point.</p><figure><img alt="Tooltips in WinUI Doughnut Chart" src="https://cdn-images-1.medium.com/max/600/1*2pKzgYn3e-vyyTuz2hPEbA.gif" /><figcaption>Tooltips in WinUI Doughnut Chart</figcaption></figure><h3>8. Selection</h3><p>This feature allows the users to interactively <a href="https://help.syncfusion.com/winui/circular-charts/selection">select</a> and highlight a data point. This is widely used to navigate to another page of information about a selected data point or update other components on the same page based on the selected data point.</p><figure><img alt="Selecting Data Points in WinUI Doughnut Chart" src="https://cdn-images-1.medium.com/max/600/1*mXYkspEpnsmNqipqPX3fnw.gif" /><figcaption>Selecting Data Points in WinUI Doughnut Chart</figcaption></figure><h3>9. Animation</h3><p>An animated chart, such as the one following, will attract the audience’s attention and direct it to specific points on the graph.</p><figure><img alt="Animated WinUI Doughnut Chart" src="https://cdn-images-1.medium.com/max/600/1*rkVOwt5MA26cvd-NPqi9Iw.gif" /><figcaption>Animated WinUI Doughnut Chart</figcaption></figure><h3>10. UI Styling customization</h3><p>Customization is one of the significant features of any data visualization control. You can <a href="https://help.syncfusion.com/winui/circular-charts/appearance">customize</a> the look and feel of the WinUI circular charts using the built-in APIs.</p><figure><img alt="Customizing the Appearance of WinUI Doughnut Chart" src="https://cdn-images-1.medium.com/max/900/1*hB_qQVoT2kU1lnsUlwyMyA.png" /><figcaption>Customizing the Appearance of WinUI Doughnut Chart</figcaption></figure><h3>References</h3><p>For more details about the WinUI circular charts, refer to the following links:</p><ul><li><a href="https://github.com/syncfusion/winui-demos/tree/master/chart">GitHub demos</a></li><li><a href="https://help.syncfusion.com/winui/circular-charts/getting-started">User guide</a></li><li><a href="https://www.microsoft.com/en-us/p/syncfusion-winui-controls-gallery/9n0fp16ddc06">Examples on Windows Store</a></li><li><a href="https://help.syncfusion.com/cr/WinUI/Syncfusion.UI.Xaml.Charts.SfCircularChart.html">API documentation</a></li></ul><h3>Conclusion</h3><p>Thanks for reading! In this blog post, we have seen the top 10 features of the Syncfusion WinUI circular charts. These chart types support other features, too. Use these vivid features to elegantly design and visualize the data points in your WinUI charts!</p><p>If you aren’t a customer yet, you can try our 30-day <a href="https://www.syncfusion.com/downloads">free trial</a> to check out these features.</p><p>If you wish to send us feedback or would like to submit any questions, please feel free to post them in the comments section of this blog post. You can also contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://www.syncfusion.com/feedback">feedback portal</a>, or <a href="https://support.syncfusion.com/">support portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/winui-3-date-picker-control-a-perfect-tool-for-date-selection.aspx">WinUI 3 Date Picker Control-A Perfect Tool for Date Selection</a></li><li><a href="https://www.syncfusion.com/blogs/post/winui-scheduler-a-smart-tool-to-handle-appointments-in-a-hospital.aspx">WinUI Scheduler: A Smart Tool to Handle Appointments in a Hospital</a></li><li><a href="https://www.syncfusion.com/blogs/post/pick-colors-like-a-boss-using-syncfusion-color-controls-in-winui.aspx">Pick Colors Like a Boss Using Syncfusion Color Controls in WinUI</a></li><li><a href="https://www.syncfusion.com/blogs/post/how-to-develop-a-sleep-tracker-in-winui-and-exploring-2021-volume-3-updates-for-winui-maui-wpf-webinar-show-notes.aspx">How to Develop a Sleep Tracker in WinUI and Exploring 2021 Volume 3 Updates for WinUI, MAUI, &amp; WPF [Webinar Show Notes]</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/10-features-of-winui-circular-charts-that-make-it-appealing.aspx"><em>https://www.syncfusion.com</em></a><em> on December 15, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e581f4a5fbb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/10-features-of-winui-circular-charts-that-make-it-appealing-6e581f4a5fbb">10 Features of WinUI Circular Charts That Make It Appealing</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[8 Simple Tips for Using an API in a Mobile App]]></title>
            <link>https://medium.com/syncfusion/8-simple-tips-for-using-an-api-in-a-mobile-app-d1854410dc77?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1854410dc77</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[app-development]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Tue, 14 Dec 2021 11:52:01 GMT</pubDate>
            <atom:updated>2021-12-14T12:04:37.012Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*_lcdJISZ6BlK4GWXhQ9t6Q@2x.png" /></figure><p>An <a href="https://en.wikipedia.org/wiki/API">API</a> (application programming interface) is the heart of any application development. It allows software programs to interact with each other, the communication point for applications. A user request is sent from the app to the web server via the API. Then, the web server replies to that request via the API response.</p><p>Also, APIs play a major role in communicating to our mobile apps and in updating them. In this blog, we will see eight simple tips that need to be considered when using an API in our mobile apps for better productivity!</p><p>Let’s explore them!</p><h3>1. Check internet connectivity before API call</h3><p>Before calling an API from the mobile app to get data from the server or post data to it, we need to confirm internet connectivity. If there is no internet connection, we can’t call an API and we have to notify the end user about the internet connection failure. This will avoid application crashes.</p><p>There are two ways ways to verify the internet connection, one is before each API call and the other is making a global callback in your app to notify if the internet connection status changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J5nb_HKXhXf9wkpF.png" /></figure><h3>2. API versioning</h3><p>Users’ requirements may change over time, and therefore the API logic will also change over time based on their requirements. Even though the API changes, the API clients (mobile app) must keep working.</p><p>If it is a non-breaking change, like additional functionality added in the API, there are no issues to deal with. But, if it is a breaking change, we need to handle that in the API client app too.</p><p>So, we need to update the mobile apps immediately after the API changes. The <a href="https://en.wikipedia.org/wiki/App_Store_(iOS/iPadOS)">App Store</a> and <a href="https://en.wikipedia.org/wiki/Google_Play">Play Store</a> take some time to complete their review for new app updates. Also, many existing users won’t update to the newer version immediately. In these cases, we should support the existing versions until the users update the app with the latest version. The solution to this case is <strong>API versioning</strong>.</p><p>With the API version endpoints <strong>/api/v1/get</strong> and <strong>/api/v2/get</strong>, new changes will be available in the latest API version and the existing app will still be able to access the older API version. After a while, you can confirm the old version API traffic has ceased and stop keeping the old version available.</p><h3>3. Show loading/progress indicator until API responds</h3><p>After requesting the API, it may take some time to get a response from the server. During this standby time, we should show the loading progress to the end user to indicate that something is going on in the background and instruct them to wait until it is completed.</p><p>In most cases, the loading/progress indicator for the API request will be displayed and hidden after a successful response from the server.</p><p>But the loading/progress indicator for a failed response won’t disappear. In this case, we should hide the loading/progress indicator, otherwise, it will appear indefinitely and may ask the user to try again.</p><p>We can show different loading pop-ups based on our needs. For normal data requests, it is sufficient to display a loading pop-up with text. But for the API request to download files, we should show the completed percentage in the progress indicator to notify the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W8w_LKwTF4c7YKOg.png" /></figure><h3>4. Messaging</h3><p>We can set a common error message for all API error responses, but this is not recommended. Instead of hardcoding a common message for all API errors, follow the standard error response with a message and status code. With this, we can show error messages based on the current user action. This will help the end-user easily understand the reason the request failed.</p><p>Refer to the following code example for a JSON error response.</p><pre>{ &quot;StatusCode&quot; : 403, &quot;Message&quot;: &quot;You don&#39;t have permission to edit this content&quot; }</pre><h3>5. Pagination/lazy loading</h3><p>The screen size of a mobile device is smaller than the desktop. If we pull a huge amount of data from the server, we have to wait for the response and can see only a few items on the mobile screen.</p><p>To avoid this, you can use pagination and request the required number of items from the server based on your screen size. The API will respond quickly when we request a small number of items. This will reduce the loading time. Then, we can request the next set of data when we scroll or move to the next page.</p><h3>6. Log out a user remotely</h3><p>Compared to web apps, mobile apps perform the login process at once. They do not ask the end-user to log in every time while opening the app.</p><p>For example: In a mobile payment app we will log in first. But the account status verification alone is not sufficient for the login process. User accounts may expire after logging in. For this case, we have to return the proper status code from the API to the client request. Based on the API status code, the mobile app either redirects to the payment page or logs the user out from the app. Refer to the following examples:</p><ul><li>Status code 404: Payment required, redirect to the account page, and inform to renew or pay.</li><li>Status code 401: Unauthorized, redirect to the login page, and ask to log in again.</li></ul><h3>7. Force to update the application</h3><p>After making major changes to both the API and the mobile app, we may plan to discontinue support for older versions. However, the user may still use the older versions.</p><p>So, we have to remind the user to update the app to the latest version. To do this, send the application version on the request headers. The API will return the appropriate message and status code. Then, the client-side code will prompt the end user for an update request based on the API response.</p><p>Refer to the following screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a90gvQuyHC5UAZ8w.png" /></figure><h3>8. Send network type in API request</h3><p>If your app supports video streaming, then you may handle different file qualities based on the mobile network type. In this scenario, send the network type in the request header. So based on the network type, the API will respond quickly.</p><p>Examples:</p><ul><li>Network type: Edge. Send a low-quality video.</li><li>Network type: LTE. Send a medium-quality video.</li><li>Network type: Wi-Fi. Send a high-quality video.</li></ul><h3>Conclusion</h3><p>Thanks for reading! In this blog, we have covered eight simple tips to enhance your productivity while using an API in mobile app development. I have provided these tips based on what I have learned personally while working on mobile apps. You may have other tips, and I hope you will share your opinion and advice in the comments section of this blog post.</p><p>Since this blog explores only simple things, I intentionally didn’t mention API security. API security is an important topic, for which we will publish a separate blog later.</p><p>Syncfusion has over 1,600 components and frameworks for <a href="https://www.syncfusion.com/winforms-ui-controls">WinForms</a>, <a href="https://www.syncfusion.com/wpf-ui-controls">WPF</a>, <a href="https://www.syncfusion.com/winui-controls">WinUI</a>, ASP.NET ( <a href="https://www.syncfusion.com/jquery/aspnet-web-forms-ui-controls">Web Forms</a>, <a href="https://www.syncfusion.com/aspnet-mvc-ui-controls">MVC</a>, <a href="https://www.syncfusion.com/aspnet-core-ui-controls">Core</a>), <a href="https://www.syncfusion.com/uwp-ui-controls">UWP</a>, <a href="https://www.syncfusion.com/xamarin-ui-controls/">Xamarin</a>, <a href="https://www.syncfusion.com/flutter-widgets">Flutter</a>, <a href="https://www.syncfusion.com/javascript-ui-controls">JavaScript</a>, <a href="https://www.syncfusion.com/angular-ui-components">Angular</a>, <a href="https://www.syncfusion.com/blazor-components">Blazor</a>, <a href="https://www.syncfusion.com/vue-ui-components">Vue</a>, and <a href="https://www.syncfusion.com/react-ui-components">React</a>. Use them to boost your application development speed.</p><p>For existing customers, the new version is available for download from the <a href="https://www.syncfusion.com/account/downloads">License and Downloads</a> page. If you are not yet a Syncfusion customer, you can try our 30-day <a href="https://www.syncfusion.com/downloads">free trial</a> to check out our available features.</p><p>Also, you can contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://www.syncfusion.com/feedback">feedback portal</a>, or <a href="https://support.syncfusion.com/">support portal</a>. We are always happy to assist you!</p><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/8-simple-tips-for-using-an-api-in-a-mobile-app.aspx"><em>https://www.syncfusion.com</em></a><em> on December 14, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1854410dc77" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/8-simple-tips-for-using-an-api-in-a-mobile-app-d1854410dc77">8 Simple Tips for Using an API in a Mobile App</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Spreadsheet Chart Feature Overview]]></title>
            <link>https://medium.com/syncfusion/javascript-spreadsheet-chart-feature-overview-ae60c892b041?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae60c892b041</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[charts]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Thu, 13 May 2021 10:00:20 GMT</pubDate>
            <atom:updated>2021-05-13T12:46:14.679Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fiLzLGwWzpFMU025.png" /></figure><p>The Syncfusion <a href="https://www.syncfusion.com/javascript-ui-controls/js-spreadsheet">JavaScript Spreadsheet</a> (HTML5 Excel viewer) is a feature-rich control for organizing and analyzing data in a tabular format. It provides all the common Excel features, including data binding, selection, editing, formatting, resizing, sorting, importing, and exporting Excel worksheets. In this blog post, we will look at the chart feature in the JavaScript Spreadsheet that helps users transform their data into an intuitive overview for better understanding. The Spreadsheet control also provides a built-in set of chart types, so you can select the best one to visualize your data.</p><h3>Types of charts</h3><p>Different scenarios require different types of charts. The types available in the JavaScript Spreadsheet control are:</p><ul><li><strong>Column chart</strong></li><li>Clustered column</li><li>Stacked column</li><li>100% stacked column</li><li><strong>Bar chart</strong></li><li>Clustered bar</li><li>Stacked bar</li><li>100% stacked bar</li><li><strong>Area chart</strong></li><li>Area</li><li>Stacked area</li><li>100% stacked area</li><li><strong>Line chart</strong></li><li>Line</li><li>Stacked line</li><li>100% stacked line</li><li><strong>Pie/Doughnut chart</strong></li><li><strong>Scatter chart</strong></li></ul><h3>When to use which chart?</h3><p>The following table lists the different chart types with their common use cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*07MXkQqMegrqA2bO1R5Exg.png" /></figure><h4>Chart themes</h4><p>The JavaScript Spreadsheet control provides the following vivid chart themes to elegantly visualize data:</p><ul><li>Material</li><li>Fabric</li><li>Bootstrap</li><li>HighContrastLight</li><li>MaterialDark</li><li>FabricDark</li><li>HighContrast</li><li>BootstrapDark</li><li>Bootstrap4</li></ul><h3>Move or resize a chart</h3><p>With the JavaScript Spreadsheet control, you can easily move a chart to any location within the worksheet. Also, you can change the dimensions of the chart for a better fit. You can resize the chart by clicking and dragging the four handles as shown in the following screenshot.</p><figure><img alt="Resizing a Column Chart in the JavaScript Spreadsheet" src="https://cdn-images-1.medium.com/max/936/0*KHrO8jLQf7sXVkNr.png" /><figcaption>Resizing a Column Chart in the JavaScript Spreadsheet</figcaption></figure><h3>Adding Chart in the Spreadsheet through code</h3><p>In the JavaScript Spreadsheet control, you can add a chart through code by using the <strong>chart </strong>property in the cells object and the <a href="https://ej2.syncfusion.com/documentation/api/spreadsheet/#insertchart"><strong>insertChart</strong></a> public method. Then, you pass the chart options with this method.</p><p>The following code example showcases how to add a chart to the JavaScript Spreadsheet control.</p><pre>import { Spreadsheet, getFormatFromType } from &#39;@syncfusion/ej2-spreadsheet&#39;;</pre><pre>import * as dataSource from &#39;./chart-data.json&#39;;</pre><pre>/**</pre><pre>* Chart Sample</pre><pre>*/</pre><pre>//Initialize the Spreadsheet component.</pre><pre>let spreadsheet: Spreadsheet = new Spreadsheet({</pre><pre>sheets: [</pre><pre>{</pre><pre>name: &#39;GDP&#39;,</pre><pre>ranges: [{ dataSource:  (dataSource as any).GDPData , startCell: &#39;A3&#39; }],</pre><pre>rows: [</pre><pre>{</pre><pre>height: 30,</pre><pre>cells: [</pre><pre>{</pre><pre>value: &#39;Gross Domestic Product (in trillions)&#39;,</pre><pre>style: {</pre><pre>backgroundColor: &#39;#e56590&#39;, color: &#39;#fff&#39;,</pre><pre>fontWeight: &#39;bold&#39;, textAlign: &#39;center&#39;, verticalAlign: &#39;middle&#39;</pre><pre>}</pre><pre>}</pre><pre>]</pre><pre>},</pre><pre>{</pre><pre>cells: [</pre><pre>{ index: 6, chart: [{ type: &#39;Column&#39;, range: &#39;A3:E10&#39; }] }</pre><pre>]</pre><pre>}</pre><pre>],</pre><pre>columns: [</pre><pre>{ width: 80 }, { width: 75 }, { width: 75 }, { width: 75 }, { width: 75 }</pre><pre>]</pre><pre>}</pre><pre>],</pre><pre>created: () =&gt; {</pre><pre>// Formatting cells dynamically using the cellFormat method.</pre><pre>spreadsheet.cellFormat({ backgroundColor: &#39;#e56590&#39;, color: &#39;#fff&#39;, fontWeight: &#39;bold&#39;, textAlign: &#39;center&#39; }, &#39;A3:E3&#39;);</pre><pre>// Applying currency format to the specified range.</pre><pre>spreadsheet.numberFormat(getFormatFromType(&#39;Currency&#39;), &#39;B4:E10&#39;);</pre><pre>// Merging the cells from A1 to E1.</pre><pre>spreadsheet.merge(&#39;A1:E1&#39;);</pre><pre>// To insert a chart using method.</pre><pre>// spreadsheet.insertChart([{ type:  &#39;Column&#39;, range: &#39;A3:E10&#39;, isSeriesInRows: false }]);</pre><pre>}</pre><pre>});</pre><pre>//Render the initialized Spreadsheet component.</pre><pre>spreadsheet.appendTo(&#39;#spreadsheet&#39;);</pre><figure><img alt="Visualizing Data in JavaScript Spreadsheet with a Column Chart" src="https://cdn-images-1.medium.com/max/936/0*xceA1ykmNzUI4IQ2.png" /><figcaption>Visualizing Data in JavaScript Spreadsheet with a Column Chart</figcaption></figure><h3>Resource</h3><p>For more information, refer to the <a href="https://ej2.syncfusion.com/demos/#/material/spreadsheet/chart.html">JavaScript Spreadsheet chart demo</a>.</p><h3>Conclusion</h3><p>I hope you now have a better understanding of the chart feature in the Syncfusion <a href="https://www.syncfusion.com/javascript-ui-controls/js-spreadsheet">JavaScript Spreadsheet</a> control. In upcoming blogs, we will discuss the chart design tab options like chart elements and switching rows and columns. We’ll even discuss what you expect from a spreadsheet if you share your thoughts with us in the comments section below.</p><p>If you are already a Syncfusion user, you can download the Essential Studio for JavaScript <a href="https://www.syncfusion.com/account/downloads">product setup</a> to try out this control. Otherwise, you can download a free <a href="https://www.syncfusion.com/downloads/fileformats/verify">30-day trial</a>.</p><p>If you have any questions about these features, please contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>s, <a href="https://www.syncfusion.com/support/directtrac/">Direct-Trac</a>, or <a href="https://www.syncfusion.com/feedback/javascript">feedback portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/whats-new-in-2021-volume-1-javascript-spreadsheet.aspx">What’s New in 2021 Volume 1: JavaScript Spreadsheet</a></li><li><a href="https://www.syncfusion.com/blogs/post/conditional-formatting-javascript-spreadsheet.aspx">Formatting Essential JavaScript Spreadsheet: Conditional Formatting</a></li><li><a href="https://www.syncfusion.com/blogs/post/formatting-the-essential-javascript-spreadsheet-cell-formatting.aspx">Formatting the Essential JavaScript Spreadsheet: Cell Formatting</a></li><li><a href="https://www.syncfusion.com/blogs/post/formatting-the-essential-javascript-spreadsheet-number-formatting.aspx">Formatting the Essential JavaScript Spreadsheet: Number Formatting</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/javascript-spreadsheet-chart-feature-overview.aspx"><em>https://www.syncfusion.com</em></a><em> on May 13, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae60c892b041" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/javascript-spreadsheet-chart-feature-overview-ae60c892b041">JavaScript Spreadsheet Chart Feature Overview</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create Flutter Radial Range Sliders Using Radial Gauge]]></title>
            <link>https://medium.com/syncfusion/how-to-create-flutter-radial-range-sliders-using-radial-gauge-b89a8d0d41e0?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b89a8d0d41e0</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Wed, 12 May 2021 10:00:16 GMT</pubDate>
            <atom:updated>2021-05-12T12:08:07.492Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wcF1j6lH2ut01BcJakHSxQ.png" /></figure><p>A simple and flexible radial range slider or a circular range slider is commonly requested widget in many platforms. In Flutter, we can easily create a range slider by customizing our <a href="https://www.syncfusion.com/flutter-widgets/flutter-radial-gauge">Radial Gauge</a> widget. In this blog, we are going to see how we can do this.</p><h3>Radial range slider</h3><p>A radial range slider, also known as circular or round range slider widget, allows users to select a range of values. In the following image, the first range slider has a selected range of 0 to 72 and the other one has a selected range between 73 to 99.</p><figure><img alt="Radial range slider" src="https://cdn-images-1.medium.com/max/624/0*HWKOmbJhCpuaBKND.png" /><figcaption>Radial range slider</figcaption></figure><h3>Requirements of a radial range slider</h3><p>Essential features of a radial range slider are:</p><ul><li>A circular track.</li><li>Two thumbs.</li><li>Ticks and labels to mark the values on the track.</li><li>Ability to customize the track color in-between two thumbs to show the selected range.</li><li>Touch interaction for the two thumbs to change the positions.</li></ul><p>Looking at these requirements, it is clear that the Syncfusion Flutter Radial Gauge widget is the perfect match for creating our own radial range slider.</p><p>Let’s see how. To add the Syncfusion Radial Gauge to your Flutter project, refer this <a href="https://help.syncfusion.com/flutter/radial-gauge/getting-started#add-flutter-radial-gauge-to-an-application">getting started documentation</a>.</p><h3>Creating a Flutter radial range slider</h3><p>We are going to create a Flutter radial range slider with the use case of a pressure meter. This will update the pressure status based on the selected range as shown in the following image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/0*N8qaOPYmnv8LeTOk.png" /></figure><p>Please follow the steps to create the elements one by one.</p><p><strong>Step 1:</strong> Obviously, the first step is to create the slider track and add labels in it. We can easily do this with minimum lines of code.</p><pre>SfRadialGauge(axes: &lt;RadialAxis&gt;[</pre><pre>RadialAxis(</pre><pre>//Sets the minimum range for the slider.</pre><pre>minimum: 0,</pre><pre>//Sets the maximum range for the slider.</pre><pre>maximum: 100,</pre><pre>//Sets the interval range.</pre><pre>interval: 10,</pre><pre>//Sets the minor ticks between interval range.</pre><pre>minorTicksPerInterval: 10,</pre><pre>//Sets the start angle.</pre><pre>startAngle: 250,</pre><pre>//Sets the end angle.</pre><pre>endAngle: 250,</pre><pre>)</pre><pre>]);</pre><figure><img alt="Slider with track and labels" src="https://cdn-images-1.medium.com/max/292/0*QSbCEpfaGrrPedg2.png" /><figcaption>Slider with track and labels</figcaption></figure><p><strong>Step 2:</strong> Next, add the thumbs to the Radial Gauge along with the logic to handle the user dragging interactions.</p><pre>//Add the marker pointer for creating thumbs in slider.</pre><pre>pointers: &lt;GaugePointer&gt;[</pre><pre>//First thumb</pre><pre>MarkerPointer(</pre><pre>value: _firstMarkerValue, // We declared this in state class.</pre><pre>enableDragging: true,</pre><pre>borderColor: Colors.green,</pre><pre>borderWidth: 5,</pre><pre>color: Colors.white,</pre><pre>markerHeight: 25,</pre><pre>markerWidth: 25,</pre><pre>markerType: MarkerType.circle,</pre><pre>onValueChanged: _handleFirstPointerValueChanged,</pre><pre>onValueChanging: _handleFirstPointerValueChanging,</pre><pre>),</pre><pre>//Second thumb</pre><pre>MarkerPointer(</pre><pre>value: _secondMarkerValue, // We declared this in state class.</pre><pre>color: Colors.white,</pre><pre>enableDragging: true,</pre><pre>borderColor: Colors.orange,</pre><pre>markerHeight: 25,</pre><pre>borderWidth: 5,</pre><pre>markerWidth: 25,</pre><pre>markerType: MarkerType.circle,</pre><pre>onValueChanged: _handleSecondPointerValueChanged,</pre><pre>onValueChanging: _handleSecondPointerValueChanging,</pre><pre>),</pre><pre>],</pre><pre>/// Update the first thumb value to the range.</pre><pre>void _handleFirstPointerValueChanged(double value) {</pre><pre>if (value &lt; _secondMarkerValue) {</pre><pre>setState(() {</pre><pre>_firstMarkerValue = value;</pre><pre>});</pre><pre>}</pre><pre>}</pre><pre>/// Cancel the dragging when pointer value reaching the axis end/start value, greater/less than another.</pre><pre>/// pointer value.</pre><pre>void _handleFirstPointerValueChanging(ValueChangingArgs args) {</pre><pre>if (args.value &lt; _secondMarkerValue) {</pre><pre>_firstMarkerValue = args.value;</pre><pre>} else {</pre><pre>args.cancel = true;</pre><pre>}</pre><pre>}</pre><pre>/// Cancel the dragging when pointer value reaching the axis end/start value, greater/less than another.</pre><pre>/// pointer value.</pre><pre>void _handleSecondPointerValueChanging(ValueChangingArgs args) {</pre><pre>if (_firstMarkerValue &lt; args.value) {</pre><pre>_secondMarkerValue = args.value;</pre><pre>} else {</pre><pre>args.cancel = true;</pre><pre>}</pre><pre>}</pre><pre>/// Update the second thumb value to the range.</pre><pre>void _handleSecondPointerValueChanged(double value) {</pre><pre>if (_firstMarkerValue &lt; value) {</pre><pre>setState(() {</pre><pre>_secondMarkerValue = value;</pre><pre>});</pre><pre>}</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/0*ZVXuq_Lxieuk9JI-.png" /></figure><p><strong>Step 3: </strong>Now, the thumbs are on track and we have to update the color of the track bar between the two thumbs.</p><pre>ranges: &lt;GaugeRange&gt;[</pre><pre>GaugeRange(</pre><pre>endValue: _secondMarkerValue, // We declared this in state class.</pre><pre>sizeUnit: GaugeSizeUnit.factor,</pre><pre>startValue: _firstMarkerValue, // We declared this in state class.</pre><pre>startWidth: 0.06,</pre><pre>endWidth: 0.06)</pre><pre>],</pre><figure><img alt="Updating color between two thumbs in pressure meter" src="https://cdn-images-1.medium.com/max/300/0*9_TXAtj3CN78HtTC.png" /><figcaption>Updating color between two thumbs in pressure meter</figcaption></figure><p><strong>Step 4:</strong> Now we update the pressure value based on the range selected. For that, use the annotations feature in the Flutter Radial Gauge widget.</p><pre>annotations: &lt;GaugeAnnotation&gt;[</pre><pre>GaugeAnnotation(</pre><pre>widget: Row(</pre><pre>mainAxisSize: MainAxisSize.min,</pre><pre>children: &lt;Widget&gt;[</pre><pre>Text(</pre><pre>&#39;$_annotationValue&#39;, // We declared this in state class.</pre><pre>style: TextStyle(</pre><pre>fontSize: 25,</pre><pre>fontFamily: &#39;Times&#39;,</pre><pre>fontWeight: FontWeight.bold,</pre><pre>color: Colors.lightBlueAccent),</pre><pre>),</pre><pre>],</pre><pre>),</pre><pre>positionFactor: 0.1,</pre><pre>angle: 0)</pre><pre>]</pre><p>After executing this code, you will get the pressure meter in your Flutter application.</p><figure><img alt="Pressure meter (radial range slider) using Flutter Radial Gauge" src="https://cdn-images-1.medium.com/max/310/0*SzWJ7zqqGtr_LgVy.png" /><figcaption>Pressure meter (radial range slider) using Flutter Radial Gauge</figcaption></figure><p><strong>Note:</strong> Get the complete source code from the <a href="https://github.com/SyncfusionExamples/create-radial-range-slider-in-flutter-">Create Radial Range Slider in Flutter demo</a>.</p><h3>Different styles of radial range slider</h3><p>You can also apply the following different styles to the radial range slider, available in our Syncfusion Flutter Radial Gauge widget.</p><ul><li><a href="https://www.syncfusion.com/blogs/post/create-flutter-radial-range-sliders-using-radial-gauge.aspx#change-the-shape-of-the-range">Change the shape of the range track.</a></li><li><a href="https://www.syncfusion.com/blogs/post/create-flutter-radial-range-sliders-using-radial-gauge.aspx#apply-gradient-colors-to-the-range">Apply gradient colors to the range.</a></li><li><a href="https://www.syncfusion.com/blogs/post/create-flutter-radial-range-sliders-using-radial-gauge.aspx#apply-gradient-colors-to-the-slider-track">Apply gradient colors to the track.</a></li><li><a href="https://www.syncfusion.com/blogs/post/create-flutter-radial-range-sliders-using-radial-gauge.aspx#customize-the-thumbs-of-the-radial-range-slider">Customize the thumbs.</a></li></ul><p>Let’s see how to do these with code examples!</p><h3>Change the shape of the range</h3><p>You can change the shape of the range track with the start and end width properties of the Flutter Radial Gauge widget.</p><pre>//Add the track color between thumbs.</pre><pre>ranges: &lt;GaugeRange&gt;[</pre><pre>GaugeRange(</pre><pre>endValue: _secondMarkerValue, // We declared this in state class.</pre><pre>sizeUnit: GaugeSizeUnit.factor,</pre><pre>startValue: _firstMarkerValue, // We declared this in state class.</pre><pre>//Set diffrent values to the start and end widths.</pre><pre>startWidth: 0.08,</pre><pre>endWidth: 0.02)</pre><pre>],</pre><figure><img alt="Customized range shape in Flutter radial range slider" src="https://cdn-images-1.medium.com/max/285/0*PxlcexPgQNOS-HUn.png" /><figcaption>Customized range shape in Flutter radial range slider</figcaption></figure><p><strong>Note:</strong> For more details, refer to the <a href="https://help.syncfusion.com/flutter/radial-gauge/ranges#range-customization">Range Customization documentation</a>.</p><h3>Apply gradient colors to the ranges</h3><p>You can also apply gradient colors to ranges and the radial slider track.</p><pre>//Add the track color between thumbs.</pre><pre>ranges: &lt;GaugeRange&gt;[</pre><pre>GaugeRange(</pre><pre>gradient: const SweepGradient(</pre><pre>colors: &lt;Color&gt;[Colors.red, Colors.blue],</pre><pre>stops: &lt;double&gt;[0.25, 0.75]),</pre><pre>endValue: _secondMarkerValue, // We declared this in state class</pre><pre>sizeUnit: GaugeSizeUnit.factor,</pre><pre>startValue: _firstMarkerValue, // We declared this in state class</pre><pre>//Set diffrent values to the start and end widths.</pre><pre>startWidth: 0.08,</pre><pre>endWidth: 0.02)</pre><pre>],</pre><figure><img alt="Applying gradient colors to the ranges" src="https://cdn-images-1.medium.com/max/301/0*CqXixRvsT6kKfuuA.png" /><figcaption>Applying gradient colors to the ranges</figcaption></figure><h3>Apply gradient colors to the slider track</h3><p>You can apply smooth and vivid color transition to the slider track line by specifying the gradient color.</p><pre>axisLineStyle: AxisLineStyle(</pre><pre>thickness: 0.1,</pre><pre>thicknessUnit: GaugeSizeUnit.factor,</pre><pre>gradient: const SweepGradient(</pre><pre>colors: &lt;Color&gt;[Color(0xFFFF7676), Color(0xFFF54EA2)],</pre><pre>stops: &lt;double&gt;[0.25, 0.75]),</pre><pre>),</pre><figure><img alt="Applying gradient colors to the slider track" src="https://cdn-images-1.medium.com/max/305/0*imka9ITWnk3TT7rr.png" /><figcaption>Applying gradient colors to the slider track</figcaption></figure><h3>Customize the thumbs of the radial range slider</h3><p>Syncfusion Flutter Radial Gauge supports the following marker types:</p><ul><li>Circle</li><li>Diamond</li><li>Image</li><li>Inverted triangle</li><li>Rectangle</li><li>Text</li><li>Triangle</li></ul><p>Since we use the marker pointers as thumbs for sliders, the same is applicable for the radial range slider, too.</p><p>To use these marker types as thumbs, just specify the type, as shown in the following code example.</p><pre>MarkerPointer(</pre><pre>markerType: MarkerType.circle,</pre><pre>),</pre><p><strong>Note:</strong> For more details, refer to the <a href="https://help.syncfusion.com/flutter/radial-gauge/marker-pointer">marker pointer documentation</a>.</p><h3>Resources</h3><p>You can get a complete working demo for <a href="https://github.com/SyncfusionExamples/create-radial-range-slider-in-flutter-/blob/main/main.dart">Creating Different Styles of Radial Range Slider using Flutter Radial Gauge</a>.</p><h3>Conclusion</h3><p>I hope you have enjoyed reading this blog. Now, you have an idea about how to create a radial range slider in Flutter and apply different styles to it with the help of developer-friendly APIs in our Syncfusion <a href="https://www.syncfusion.com/flutter-widgets/flutter-radial-gauge">Flutter Radial Gauge</a>.</p><p>Please go through the complete <a href="https://help.syncfusion.com/flutter/radial-gauge/getting-started">user guide</a>, and also check out our other samples in our <a href="https://github.com/syncfusion/flutter-examples">Flutter examples</a>. Additionally, you can download and check out our demo app on <a href="https://play.google.com/store/apps/details?id=com.syncfusion.flutter.examples&amp;hl=en">Google Play</a>, the <a href="https://apps.apple.com/in/app/syncfusion-flutter-ui-widgets/id1475231341">App Store</a>, and our <a href="https://flutter.syncfusion.com/#/">website</a>.</p><p>If you have any questions about this control, please let us know in the comments section below. You can also contact us through our <a href="https://www.syncfusion.com/forums">support forums</a>, <a href="https://www.syncfusion.com/support/directtrac/">Direct-Trac</a>, or <a href="https://www.syncfusion.com/feedback">feedback portal</a>. We are always happy to assist you!</p><h3>Related Blogs</h3><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/create-flutter-radial-range-sliders-using-radial-gauge.aspx"><em>https://www.syncfusion.com</em></a><em> on May 12, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b89a8d0d41e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/how-to-create-flutter-radial-range-sliders-using-radial-gauge-b89a8d0d41e0">How to Create Flutter Radial Range Sliders Using Radial Gauge</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Add Animated and Interactive Custom Map Markers in Flutter Maps]]></title>
            <link>https://medium.com/syncfusion/how-to-add-animated-and-interactive-custom-map-markers-in-flutter-maps-599ba6c77564?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/599ba6c77564</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Tue, 11 May 2021 11:00:51 GMT</pubDate>
            <atom:updated>2021-05-11T12:14:52.246Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fnajWHoE0prsa6Xd.png" /></figure><p>In Maps, markers are a primary tool used to denote locations with precise latitude and longitude coordinates. The Syncfusion <a href="https://www.syncfusion.com/flutter-widgets/flutter-maps">Flutter Maps</a> widget has built-in support to add markers on the <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapShapeLayer-class.html">MapShapeLayer</a> or <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTileLayer-class.html">MapTileLayer</a>. You can use any type of custom widget as a marker, or built-in shapes such as circles, diamonds, squares, and triangles.</p><p>In this blog, I am going to explain how to add markers and animate them. If you are new to our Flutter Maps widget, please refer to the following blog posts before proceeding:</p><h3>Add an animated marker at load time</h3><p>To add an animated marker at load time, we have to add an animated widget as a child of <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapMarker-class.html">MapMarker</a> and start the animation in the <a href="https://api.flutter.dev/flutter/widgets/State/initState.html">initState</a>.</p><p>In the following example, I’ve animated the fourth index marker at load time.</p><pre>class _LoadAnimatableMarkerAtLoadtime extends StatefulWidget {</pre><pre>@override</pre><pre>_LoadAnimatableMarkerAtLoadtimeState createState() =&gt;</pre><pre>_LoadAnimatableMarkerAtLoadtimeState();</pre><pre>}</pre><pre>class _LoadAnimatableMarkerAtLoadtimeState</pre><pre>extends State&lt;_LoadAnimatableMarkerAtLoadtime&gt;</pre><pre>with SingleTickerProviderStateMixin {</pre><pre>late AnimationController _controller;</pre><pre>late CurvedAnimation _animation;</pre><pre>late Map&lt;String, MapLatLng&gt; _markers;</pre><pre>int _selectedMarkerIndex = 4;</pre><pre>@override</pre><pre>void initState() {</pre><pre>_controller = AnimationController(</pre><pre>vsync: this, duration: const Duration(milliseconds: 750));</pre><pre>_animation =</pre><pre>CurvedAnimation(parent: _controller, curve: Curves.easeOutBack);</pre><pre>_markers = &lt;String, MapLatLng&gt;{</pre><pre>&#39;Chad&#39;: MapLatLng(15.454166, 18.732206),</pre><pre>&#39;Nigeria&#39;: MapLatLng(9.081999, 8.675277),</pre><pre>&#39;DRC&#39;: MapLatLng(-4.038333, 21.758663),</pre><pre>&#39;CAR&#39;: MapLatLng(6.600281, 20.480205),</pre><pre>&#39;Sudan&#39;: MapLatLng(12.862807, 30.217636),</pre><pre>&#39;Kenya&#39;: MapLatLng(0.0236, 37.9062),</pre><pre>&#39;Zambia&#39;: MapLatLng(-10.974129, 30.861397),</pre><pre>&#39;Egypt&#39;: MapLatLng(25.174109, 28.776359),</pre><pre>&#39;Algeria&#39;: MapLatLng(24.276672, 7.308186),</pre><pre>};</pre><pre>_controller.repeat(min: 0.15, max: 1.0, reverse: true);</pre><pre>super.initState();</pre><pre>}</pre><pre>@override</pre><pre>void dispose() {</pre><pre>_controller.stop();</pre><pre>_controller.dispose();</pre><pre>super.dispose();</pre><pre>}</pre><pre>@override</pre><pre>Widget build(BuildContext context) {</pre><pre>return Scaffold(</pre><pre>appBar: AppBar(</pre><pre>title: Text(&#39;Load animatable marker at loadtime&#39;),</pre><pre>),</pre><pre>body: MapTileLayer(</pre><pre>urlTemplate: &#39;https://tile.openstreetmap.org/{z}/{x}/{y}.png&#39;,</pre><pre>initialZoomLevel: 3,</pre><pre>initialFocalLatLng: MapLatLng(2.3104, 16.5581),</pre><pre>initialMarkersCount: _markers.length,</pre><pre>markerBuilder: (BuildContext context, int index) {</pre><pre>final double size = _selectedMarkerIndex == index ? 40 : 25;</pre><pre>final MapLatLng markerData = _markers.values.elementAt(index);</pre><pre>final Icon current = Icon(Icons.location_pin, size: size);</pre><pre>return MapMarker(</pre><pre>latitude: markerData.latitude,</pre><pre>longitude: markerData.longitude,</pre><pre>child: Transform.translate(</pre><pre>offset: Offset(0.0, -size / 2),</pre><pre>child: _selectedMarkerIndex == index</pre><pre>? ScaleTransition(</pre><pre>alignment: Alignment.bottomCenter,</pre><pre>scale: _animation,</pre><pre>child: current)</pre><pre>: current,</pre><pre>),</pre><pre>);</pre><pre>},</pre><pre>),</pre><pre>);</pre><pre>}</pre><pre>}</pre><figure><img alt="Adding an Animated Marker During Initial Loading of Flutter Maps" src="https://cdn-images-1.medium.com/max/480/1*4vXrcVqTFlsoWdHvWAixxw.gif" /><figcaption>Adding an Animated Marker During Initial Loading of Flutter Maps</figcaption></figure><h3>Adding a marker programmatically</h3><p>To add or update markers dynamically, we will need the help of <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapShapeLayerController-class.html">MapShapeLayerController</a> or <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTileLayerController-class.html">MapTileLayerController</a> depending on whether we use <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapShapeLayer-class.html">MapShapeLayer</a> or <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTileLayer-class.html">MapTileLayer</a> to include the marker. MapShapeLayerController and MapTileLayerController control the marker collection dynamically by adding, removing, updating, and clearing the markers.</p><p>In the following example, we will add a marker dynamically at a precise coordinate by using the <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLayerController/insertMarker.html">insertMarker</a> method of <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapShapeLayerController-class.html">MapShapeLayerController</a>. Here, we use the <a href="https://api.flutter.dev/flutter/widgets/Icon-class.html">Icon</a> widget as a marker. Calling the <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLayerController/insertMarker.html">insertMarker</a> method of the MapShapeLayerControl triggers the <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTileLayer-class.html">TileLayer</a>’s <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLayer/markerBuilder.html">markerBuilder</a> callback with the respective index. Here, we have to return the <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapMarker-class.html">MapMarker</a> to be updated in the current index.</p><pre>class AddingMarkerDynamically extends StatefulWidget {</pre><pre>@override</pre><pre>_AddingMarkerDynamicallyState createState() =&gt;</pre><pre>_AddingMarkerDynamicallyState();</pre><pre>}</pre><pre>class _AddingMarkerDynamicallyState extends State</pre><pre>with SingleTickerProviderStateMixin {</pre><pre>late MapTileLayerController _tileLayerController;</pre><pre>@override</pre><pre>void initState() {</pre><pre>_tileLayerController = MapTileLayerController();</pre><pre>super.initState();</pre><pre>}</pre><pre>@override</pre><pre>void dispose() {</pre><pre>_tileLayerController.dispose();</pre><pre>super.dispose();</pre><pre>}</pre><pre>@override</pre><pre>Widget build(BuildContext context) {</pre><pre>return Scaffold(</pre><pre>appBar: AppBar(</pre><pre>title: Text(&#39;Add a marker dynamically&#39;),</pre><pre>),</pre><pre>body: MapTileLayer(</pre><pre>urlTemplate: &#39;https://tile.openstreetmap.org/{z}/{x}/{y}.png&#39;,</pre><pre>initialZoomLevel: 3,</pre><pre>initialFocalLatLng: MapLatLng(2.3104, 16.5581),</pre><pre>controller: _tileLayerController,</pre><pre>markerBuilder: (BuildContext context, int index) {</pre><pre>return MapMarker(</pre><pre>latitude: 6.6111,</pre><pre>longitude: 20.9394,</pre><pre>child: Transform.translate(</pre><pre>offset: Offset(0.0, -20.0),</pre><pre>child: Icon(Icons.location_pin, size: 40),</pre><pre>),</pre><pre>);</pre><pre>},</pre><pre>),</pre><pre>floatingActionButton: FloatingActionButton(</pre><pre>child: Icon(Icons.add_location),</pre><pre>onPressed: () =&gt; _tileLayerController.insertMarker(0),</pre><pre>),</pre><pre>);</pre><pre>}</pre><pre>}</pre><figure><img alt="Adding an Animated Marker Dynamically in Flutter Maps" src="https://cdn-images-1.medium.com/max/480/1*q1IUZXouJNb88uZ0YSOzcg.gif" /><figcaption>Adding an Animated Marker Dynamically in Flutter Maps</figcaption></figure><h3>Animate a marker or group of markers dynamically</h3><p>Dynamic marker updates require the help of <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapShapeLayerController-class.html">MapShapeLayerController</a> and <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTileLayerController-class.html">MapTileLayerController</a>. The following example demonstrates updating <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapMarker-class.html">MapMarker</a> ‘s child dynamically as an animated widget to start the animation.</p><p>In parallel, invoke <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLayerController/updateMarkers.html">updateMarkers</a> with respective marker indices to update the markers.</p><pre>class AnimateGroupOfMarkersDynamically extends StatefulWidget {</pre><pre>@override</pre><pre>_AnimateGroupOfMarkersDynamicallyState createState() =&gt;</pre><pre>_AnimateGroupOfMarkersDynamicallyState();</pre><pre>}</pre><pre>class _AnimateGroupOfMarkersDynamicallyState</pre><pre>extends State</pre><pre>with TickerProviderStateMixin {</pre><pre>late AnimationController _controller;</pre><pre>late CurvedAnimation _animation;</pre><pre>late MapTileLayerController _tileLayerController;</pre><pre>late Map&lt;String, MapLatLng&gt; _markers;</pre><pre>List _selectedMarkerIndices = [];</pre><pre>@override</pre><pre>void initState() {</pre><pre>_controller = AnimationController(</pre><pre>vsync: this,</pre><pre>duration: const Duration(milliseconds: 750),</pre><pre>reverseDuration: const Duration(milliseconds: 750));</pre><pre>_animation =</pre><pre>CurvedAnimation(parent: _controller, curve: Curves.easeOutBack);</pre><pre>_tileLayerController = MapTileLayerController();</pre><pre>_markers = &lt;String, MapLatLng&gt;{</pre><pre>&#39;Chad&#39;: MapLatLng(15.454166, 18.732206),</pre><pre>&#39;Nigeria&#39;: MapLatLng(9.081999, 8.675277),</pre><pre>&#39;DRC&#39;: MapLatLng(-4.038333, 21.758663),</pre><pre>&#39;CAR&#39;: MapLatLng(6.600281, 20.480205),</pre><pre>&#39;Sudan&#39;: MapLatLng(12.862807, 30.217636),</pre><pre>&#39;Kenya&#39;: MapLatLng(0.0236, 37.9062),</pre><pre>&#39;Zambia&#39;: MapLatLng(-10.974129, 30.861397),</pre><pre>&#39;Egypt&#39;: MapLatLng(25.174109, 28.776359),</pre><pre>&#39;Algeria&#39;: MapLatLng(24.276672, 7.308186),</pre><pre>};</pre><pre>_controller.repeat(min: 0.1, max: 1.0, reverse: true);</pre><pre>super.initState();</pre><pre>}</pre><pre>@override</pre><pre>void dispose() {</pre><pre>_controller.stop();</pre><pre>_controller.dispose();</pre><pre>super.dispose();</pre><pre>}</pre><pre>@override</pre><pre>Widget build(BuildContext context) {</pre><pre>return Scaffold(</pre><pre>appBar: AppBar(title: Text(&#39;Animate group of markers dynamically&#39;)),</pre><pre>body: MapTileLayer(</pre><pre>urlTemplate: &#39;https://tile.openstreetmap.org/{z}/{x}/{y}.png&#39;,</pre><pre>initialZoomLevel: 3,</pre><pre>initialFocalLatLng: MapLatLng(2.3104, 16.5581),</pre><pre>controller: _tileLayerController,</pre><pre>initialMarkersCount: _markers.length,</pre><pre>markerBuilder: (BuildContext context, int index) {</pre><pre>final double size = _selectedMarkerIndices.contains(index) ? 40 : 25;</pre><pre>final MapLatLng markerLatLng = _markers.values.elementAt(index);</pre><pre>Widget current = Icon(Icons.location_pin, size: size);</pre><pre>return MapMarker(</pre><pre>latitude: markerLatLng.latitude,</pre><pre>longitude: markerLatLng.longitude,</pre><pre>child: Transform.translate(</pre><pre>offset: Offset(0.0, -size / 2),</pre><pre>child: _selectedMarkerIndices.contains(index)</pre><pre>? ScaleTransition(</pre><pre>alignment: Alignment.bottomCenter,</pre><pre>scale: _animation,</pre><pre>child: current)</pre><pre>: current,</pre><pre>),</pre><pre>);</pre><pre>},</pre><pre>),</pre><pre>floatingActionButton: FloatingActionButton(</pre><pre>child: Icon(Icons.animation),</pre><pre>onPressed: () {</pre><pre>_selectedMarkerIndices = [0, 2, 4];</pre><pre>_tileLayerController.updateMarkers(_selectedMarkerIndices);</pre><pre>_controller.repeat(min: 0.1, max: 1.0, reverse: true);</pre><pre>},</pre><pre>),</pre><pre>);</pre><pre>}</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*uIJLmazxV_O4lgsqUh_xjg.gif" /><figcaption>Animating Markers Dynamically in Futter Maps</figcaption></figure><h3>Animate a marker on interaction</h3><p>Assume we have a group of markers in which we are going to animate a single marker on a tap or click gesture.</p><p>For this, we need to wrap the marker’s child inside the <a href="https://api.flutter.dev/flutter/widgets/GestureDetector-class.html">GestureDetector</a> and use the <a href="https://api.flutter.dev/flutter/widgets/GestureDetector/onTap.html">GestureDetector.onTap</a> callback to handle the tap interaction. On tapping, call <a href="https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLayerController/updateMarkers.html">updateMarkers</a> with the marker indices to animate it.</p><p>The following code demonstrates this.</p><pre>int _selectedMarkerIndex = -1;</pre><pre>int _prevSelectedMarkerIndex = -1;</pre><pre>@override</pre><pre>Widget build(BuildContext context) {</pre><pre>return Scaffold(</pre><pre>appBar: AppBar(</pre><pre>title: Text(&#39;Animate a single marker dynamically&#39;),</pre><pre>),</pre><pre>body: MapTileLayer(</pre><pre>urlTemplate: &#39;https://tile.openstreetmap.org/{z}/{x}/{y}.png&#39;,</pre><pre>initialZoomLevel: 3,</pre><pre>initialFocalLatLng: MapLatLng(2.3104, 16.5581),</pre><pre>controller: _tileLayerController,</pre><pre>initialMarkersCount: _markers.length,</pre><pre>markerBuilder: (BuildContext context, int index) =&gt;</pre><pre>_buildMarker(context, index),</pre><pre>),</pre><pre>);</pre><pre>}</pre><pre>MapMarker _buildMarker(BuildContext context, int index) {</pre><pre>final double size = _selectedMarkerIndex == index ? 40 : 25;</pre><pre>final MapLatLng markerLatLng = _markers.values.elementAt(index);</pre><pre>final Icon current = Icon(Icons.location_pin);</pre><pre>return MapMarker(</pre><pre>latitude: markerLatLng.latitude,</pre><pre>longitude: markerLatLng.longitude,</pre><pre>child: GestureDetector(</pre><pre>onTap: () {</pre><pre>_prevSelectedMarkerIndex = _selectedMarkerIndex;</pre><pre>_selectedMarkerIndex = index;</pre><pre>_tileLayerController.updateMarkers([</pre><pre>if (_prevSelectedMarkerIndex != -1) _prevSelectedMarkerIndex,</pre><pre>_selectedMarkerIndex</pre><pre>]);</pre><pre>},</pre><pre>child: AnimatedContainer(</pre><pre>transform: Matrix4.identity()..translate(0.0, -size / 2),</pre><pre>duration: const Duration(milliseconds: 250),</pre><pre>height: size,</pre><pre>width: size,</pre><pre>child: FittedBox(child: current),</pre><pre>),</pre><pre>),</pre><pre>);</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*cgxYnUTx9SjS40f8HWXtBQ.gif" /><figcaption>Animate a Marker on Interaction in Flutter Maps</figcaption></figure><h3>Resource</h3><p>For more information, refer to this <a href="https://github.com/SyncfusionExamples/flutter-maps-marker-animation">animating markers on Flutter Maps project</a> on GitHub.</p><h3>Conclusion</h3><p>In this blog, we’ve learned how to animate a single marker and groups of markers at load time, dynamically, and also via interaction in the Syncfusion <a href="https://www.syncfusion.com/flutter-widgets/flutter-maps">Flutter Maps</a> widget. Give it a try and leave your feedback in the comments section below.</p><p>Check out other features of our Flutter Maps in the <a href="https://help.syncfusion.com/flutter/maps/">user guide</a> and explore our <a href="https://github.com/syncfusion/flutter-examples">Flutter Maps project samples</a>. Additionally, check out our demo apps available on different platforms: <a href="https://play.google.com/store/apps/details?id=com.syncfusion.flutter.examples">Android</a>, <a href="https://apps.apple.com/us/app/syncfusion-flutter-ui-widgets/id1475231341">iOS</a>, <a href="https://flutter.syncfusion.com/?_ga=2.113248516.2088510317.1618203864-1079363253.1592211341">web</a>, <a href="https://www.microsoft.com/store/productId/9NHNBWCSF85D">Windows</a>, and <a href="https://snapcraft.io/syncfusion-flutter-gallery">Linux</a>.</p><p>If you need a new widget for the Flutter framework or new features in our existing widgets, you can contact us through our <a href="https://www.syncfusion.com/forums">support forums</a>, <a href="https://www.syncfusion.com/support/directtrac/incidents">Direct-Trac</a>, or <a href="https://www.syncfusion.com/feedback/flutter">feedback portal</a>. As always, we are happy to assist you!</p><p>If you like this blog post, we think you will also like the following articles too:</p><ul><li><a href="https://www.syncfusion.com/blogs/post/how-to-add-location-tracking-to-your-app-using-syncfusion-flutter-maps.aspx">How to Add Location Tracking to Your App Using Syncfusion Flutter Maps</a> [Blog]</li><li><a href="https://www.syncfusion.com/blogs/post/how-to-display-routes-and-highlight-regions-in-syncfusion-flutter-maps.aspx">How to Display Routes and Highlight Regions in Syncfusion Flutter Maps</a> [Blog]</li><li><a href="https://www.syncfusion.com/blogs/post/create-choropleth-map-using-in-flutter.aspx">How to Create a Choropleth Map in a Flutter Application</a> [Blog]</li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/add-animated-and-interactive-custom-map-markers-in-flutter-maps.aspx"><em>https://www.syncfusion.com</em></a><em> on May 11, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=599ba6c77564" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/how-to-add-animated-and-interactive-custom-map-markers-in-flutter-maps-599ba6c77564">How to Add Animated and Interactive Custom Map Markers in Flutter Maps</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Load Appointments on Demand via Web Services in WPF Scheduler]]></title>
            <link>https://medium.com/syncfusion/how-to-load-appointments-on-demand-via-web-services-in-wpf-scheduler-b4965db8a0ef?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4965db8a0ef</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[wpf]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[desktop]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Mon, 10 May 2021 10:04:32 GMT</pubDate>
            <atom:updated>2021-05-10T11:50:59.869Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TNkQAD066r-AM8J8V8yJ8Q.png" /></figure><p>The Syncfusion <a href="https://www.syncfusion.com/wpf-ui-controls/scheduler">WPF Scheduler control</a> provides all the common scheduling functionalities to create and manage day-to-day business and personal appointments. When we develop WPF applications, some of the most prevalent requirements are the ability to reduce loading time and system resource consumption.</p><p>WPF Scheduler has built-in UI virtualization for better loading and view navigation performance. But that alone won’t be enough when you’re dealing with millions of events spanning multiple years. That’s where data virtualization (on-demand loading) comes in. You can provide data to the Scheduler for a single date range instead of loading all the data for multiple years.</p><p>In this blog, we are going to discuss loading appointments on demand via web services in the WPF Scheduler control. This will improve your application’s loading performance while fetching data. If you are new to the Scheduler control, please read the <a href="https://help.syncfusion.com/wpf/scheduler/getting-started">Getting Started</a> article in the Scheduler documentation before proceeding.</p><h3>Creating a web API service</h3><p>Web services are the server-side applications that are meant to serve data or logic to various client applications. REST and SOAP are the most widely used industry-standard web service architectures.</p><p>Use the following <a href="https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-2.2&amp;tabs=visual-studio">reference</a> to create an ASP.NET Core Web API service and host it for public access. For demo purposes, we are going to use the following <a href="https://js.syncfusion.com/demos/ejservices/api/Schedule/LoadData">hosted service</a>.</p><h3>Fetching data from Web API service</h3><ol><li>Create an asynchronous method <strong>GetAppointmentsAsync</strong> and consume the API service URI.</li><li>Use the <strong>GetAsync</strong> method of <a href="https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netframework-4.8">HttpClient</a> to retrieve the appointment data as JSON<strong>.</strong></li><li>Modify the received JSON data into a list of appointments.</li></ol><pre>public static class WebAPIService</pre><pre>{</pre><pre>/// &lt;summary&gt;</pre><pre>/// Asynchronously fetching the data from the Web API service.</pre><pre>/// &lt;/summary&gt;</pre><pre>/// &lt;returns&gt;&lt;/returns&gt;</pre><pre>public static async Task&lt;ObservableCollection&lt;Event&gt;&gt; GetAp-pointmentsAsync()</pre><pre>{</pre><pre>var uri = new Uri(&quot;https://js.syncfusion.com/demos/ejservices/api/Schedule/LoadData&quot;);</pre><pre>try</pre><pre>{</pre><pre>var client = new HttpClient();</pre><pre>var response = await client.GetAsync(uri);</pre><pre>if (response.IsSuccessStatusCode)</pre><pre>{</pre><pre>var content = await response.Content.ReadAsStringAsync();</pre><pre>return (JsonConvert.DeserializeObject&lt;ObservableCollection&lt;Event&gt;&gt;(content));</pre><pre>}</pre><pre>}</pre><pre>catch (Exception ex)</pre><pre>{</pre><pre>}</pre><pre>return null;</pre><pre>}</pre><pre>}</pre><h3>Creating a model class</h3><p>Create a model class <strong>Event</strong> with a data structure similar to that of the data in the Web API service. Here, it should contain the appointment subject, time, and other related information.</p><pre>/// &lt;summary&gt;</pre><pre>/// Represents custom appointment properties.</pre><pre>/// &lt;/summary&gt;</pre><pre>public class Event</pre><pre>{</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets the subject of the appointment.</pre><pre>/// &lt;/summary&gt;</pre><pre>public string Subject { get; set; }</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets the ID of the appointment.</pre><pre>/// &lt;/summary&gt;</pre><pre>public string Id { get; set; }</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets the start time of the appointment.</pre><pre>/// &lt;/summary&gt;</pre><pre>public DateTime StartTime { get; set; }</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets the end time of the appointment.</pre><pre>/// &lt;/summary&gt;</pre><pre>public DateTime EndTime { get; set; }</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets the value that indicates whether the appointment is all day.</pre><pre>/// &lt;/summary&gt;</pre><pre>public bool AllDay { get; set; }</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets the recurrence rule of the appointment.</pre><pre>/// &lt;/summary&gt;</pre><pre>public string RecurrenceRule { get; set; }</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets the background color of the appointment.</pre><pre>/// &lt;/summary&gt;</pre><pre>public Brush Color { get; set; }</pre><pre>}</pre><h3>Binding data to Scheduler</h3><p>Create a view model <strong>SchedulerViewModel</strong> with the command property <a href="https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Scheduler.SfScheduler.html#Syncfusion_UI_Xaml_Scheduler_SfScheduler_LoadOnDemandCommand"><strong>LoadOnDemandCommand</strong></a> to fetch appointments on demand.</p><pre>public class SchedulerViewModel : NotificationObject</pre><pre>{</pre><pre>private ObservableCollection&lt;Event&gt; events;</pre><pre>private bool showBusyIndicator;</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets load on demand command.</pre><pre>/// &lt;/summary&gt;</pre><pre>public ICommand LoadOnDemandCommand { get; set; }</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets web appointments data.</pre><pre>/// &lt;/summary&gt;</pre><pre>public ObservableCollection&lt;Event&gt; WebData { get; set; }</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets a value indicating whether to show the busy indicator.</pre><pre>/// &lt;/summary&gt;</pre><pre>public bool ShowBusyIndicator</pre><pre>{</pre><pre>get { return this.showBusyIndicator; }</pre><pre>set</pre><pre>{</pre><pre>this.showBusyIndicator = value;</pre><pre>this.RaisePropertyChanged(&quot;ShowBusyIndicator&quot;);</pre><pre>}</pre><pre>}</pre><pre>/// &lt;summary&gt;</pre><pre>/// Gets or sets the events.</pre><pre>/// &lt;/summary&gt;</pre><pre>public ObservableCollection&lt;Event&gt; Events</pre><pre>{</pre><pre>get { return this.events; }</pre><pre>set</pre><pre>{</pre><pre>this.events = value;</pre><pre>this.RaisePropertyChanged(&quot;Events&quot;);</pre><pre>}</pre><pre>}</pre><pre>public SchedulerViewModel()</pre><pre>{</pre><pre>this.Events = new ObservableCollection&lt;Event&gt;();</pre><pre>this.LoadOnDemandCommand = new DelegateCommand(ExecuteOnDemandLoading, CanExecuteOnDemandLoading);</pre><pre>}</pre><pre>}</pre><p>You can bind the custom appointment data with the Scheduler component using a mapping technique. Map the properties of the <strong>Event </strong>class with the relevant properties of <a href="https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Scheduler.AppointmentMapping.html"><strong>AppointmentMapping</strong></a> class. Now, set the <strong>DataContext</strong> as <strong>SchedulerViewModel</strong>.</p><pre>&lt;Grid.DataContext&gt;</pre><pre>&lt;local:SchedulerViewModel/&gt;</pre><pre>&lt;/Grid.DataContext&gt;</pre><pre>&lt;syncfusion:SfScheduler x:Name=&quot;scheduler&quot;</pre><pre>ViewType=&quot;Month&quot;</pre><pre>ItemsSource=&quot;{Binding Events}&quot;</pre><pre>ShowBusyIndicator=&quot;{Binding ShowBusyIndicator}&quot;</pre><pre>LoadOnDemandCommand=&quot;{Binding LoadOnDemandCommand}&quot;&gt;</pre><pre>&lt;syncfusion:SfScheduler.AppointmentMapping&gt;</pre><pre>&lt;syncfusion:AppointmentMapping</pre><pre>Subject=&quot;Subject&quot;</pre><pre>StartTime=&quot;StartTime&quot;</pre><pre>EndTime=&quot;EndTime&quot;</pre><pre>IsAllDay=&quot;AllDay&quot;</pre><pre>AppointmentBackground=&quot;Color&quot;</pre><pre>RecurrenceRule=&quot;RecurrenceRule&quot;/&gt;</pre><pre>&lt;/syncfusion:SfScheduler.AppointmentMapping&gt;</pre><pre>&lt;/syncfusion:SfScheduler&gt;</pre><h3>Loading appointments on demand</h3><p>The Scheduler supports <a href="https://help.syncfusion.com/wpf/scheduler/loadondemand">loading appointments on demand</a> with a busy indicator. This improves the loading performance when you have appointments for multiple years.</p><p>The Scheduler control has <a href="https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Scheduler.SfScheduler.html#Syncfusion_UI_Xaml_Scheduler_SfScheduler_LoadOnDemandCommand"><strong>LoadOnDemandCommand</strong></a> to load appointments on demand. While loading appointments as JSON data, we can show a busy indicator by using the <a href="https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Scheduler.SfScheduler.html#Syncfusion_UI_Xaml_Scheduler_SfScheduler_ShowBusyIndicator"><strong>ShowBusyIndicator</strong></a> property.</p><p>You can get the current visible date range from the command argument of <a href="https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Scheduler.SfScheduler.html#Syncfusion_UI_Xaml_Scheduler_SfScheduler_LoadOnDemandCommand"><strong>LoadOnDemandCommand</strong></a>, fetch the appointments for the current visible date range, and update the <strong>Events</strong> property that is bound with the Scheduler <strong>ItemsSource</strong>.</p><pre>public class SchedulerViewModel : NotificationObject</pre><pre>{</pre><pre>…</pre><pre>/// &lt;summary&gt;</pre><pre>/// Method to execute load on demand command and set scheduler appointments.</pre><pre>/// &lt;/summary&gt;</pre><pre>/// &lt;param name=&quot;queryAppointments&quot;&gt;QueryAppointmentsEventArgs object.&lt;/param&gt;</pre><pre>public async void ExecuteOnDemandLoading(object queryAppointments)</pre><pre>{</pre><pre>this.ShowBusyIndicator = true;</pre><pre>await this.GetVisibleRangeAppointments((queryAppointments as QueryAp-pointmentsEventArgs).VisibleDateRange);</pre><pre>this.ShowBusyIndicator = false;</pre><pre>}</pre><pre>/// &lt;summary&gt;</pre><pre>/// Method to check whether the load on demand command can be invoked or not.</pre><pre>/// &lt;/summary&gt;</pre><pre>/// &lt;param name=&quot;queryAppointments&quot;&gt;QueryAppointmentsEventArgs object.&lt;/param&gt;</pre><pre>private bool CanExecuteOnDemandLoading(object queryAppointments)</pre><pre>{</pre><pre>return true;</pre><pre>}</pre><pre>/// &lt;summary&gt;</pre><pre>/// Method to get web appointments and update them to scheduler ItemsSource.</pre><pre>/// &lt;/summary&gt;</pre><pre>/// &lt;param name=&quot;visibleDateRange&quot;&gt;Current visible date range.&lt;/param&gt;</pre><pre>private async Task GetVisibleRangeAppointments(DateRange visibleDateRange)</pre><pre>{</pre><pre>if (this.WebData == null)</pre><pre>{</pre><pre>this.WebData = await WebAPIService.GetAppointmentsAsync();</pre><pre>}</pre><pre>var events = new ObservableCollection&lt;Event&gt;();</pre><pre>foreach (Event appointment in this.WebData)</pre><pre>{</pre><pre>if ((visibleDateRange.StartDate &lt;= appointment.StartTime.Date &amp;&amp; visibleDateRange.EndDate &gt;= appointment.StartTime.Date) ||</pre><pre>(visibleDateRange.StartDate &lt;= appointment.EndTime.Date &amp;&amp; visibleDateRange.EndDate &gt;= appointment.EndTime.Date))</pre><pre>{</pre><pre>events.Add(appointment);</pre><pre>}</pre><pre>}</pre><pre>this.Events = events;</pre><pre>}</pre><pre>}</pre><p>Now, the Scheduler control is configured to load appointments on demand. Running the <a href="https://github.com/SyncfusionExamples/load-appointments-on-demand-via-web-services-in-wpf-scheduler">sample</a> with the previous steps will render a scheduler with appointments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*JNRUSsyVWvzm3iF0.gif" /></figure><h3>Resource</h3><p>For more information, refer to <a href="https://github.com/SyncfusionExamples/load-appointments-on-demand-via-web-services-in-wpf-scheduler">Load appointments on demand via web services in WPF Scheduler demo</a>.</p><h3>Conclusion</h3><p>In this blog post, we’ve discussed loading appointments on demand in the <a href="https://www.syncfusion.com/wpf-ui-controls/scheduler">WPF Scheduler</a> control. You can also check out our project samples in this <a href="https://github.com/syncfusion/wpf-demos">GitHub</a> repository. Feel free to try out this sample and share your feedback or questions in the comments section.</p><p>You can also contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://www.syncfusion.com/support/directtrac/">Direct-Trac</a>, or <a href="https://www.syncfusion.com/feedback/">feedback portal</a>. We are always happy to assist you.</p><h3>Related blogs</h3><ul><li>[Blog] <a href="https://www.syncfusion.com/blogs/post/how-to-display-alerts-for-appointments-in-wpf-scheduler.aspx">How to Display Alerts for Appointments in WPF Scheduler</a></li><li>[Blog] <a href="https://www.syncfusion.com/blogs/post/wpf-item-template-support-for-visual-studio.aspx">Introducing WPF Item Template Support for Visual Studio</a></li><li>[Blog] <a href="https://www.syncfusion.com/blogs/post/6-features-of-wpf-autocomplete-text-box.aspx">6 Incredible Features of WPF AutoComplete Text Box</a></li><li>[Blog] <a href="https://www.syncfusion.com/blogs/post/achieve-visual-studio-like-layout-state-persistence-wpf.aspx">How to Achieve Visual Studio-Like Layout State Persistence in WPF</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/load-appointments-on-demand-via-web-services-in-wpf-scheduler.aspx"><em>https://www.syncfusion.com</em></a><em> on May 10, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4965db8a0ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/how-to-load-appointments-on-demand-via-web-services-in-wpf-scheduler-b4965db8a0ef">How to Load Appointments on Demand via Web Services in WPF Scheduler</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Syncfusion Blazor Components on Cross-Platform Desktop Apps Using Electron]]></title>
            <link>https://medium.com/syncfusion/exploring-syncfusion-blazor-components-on-cross-platform-desktop-apps-using-electron-1cff56d2f75d?source=rss-b5518cc31eb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cff56d2f75d</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[desktop-app]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[blazor]]></category>
            <dc:creator><![CDATA[Suresh Mohan]]></dc:creator>
            <pubDate>Thu, 06 May 2021 10:00:40 GMT</pubDate>
            <atom:updated>2021-05-10T11:04:42.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*a2s-qSb5rFXYoizcA0XaoQ@2x.png" /></figure><p>Syncfusion’s native <a href="https://www.syncfusion.com/blazor-components">Blazor UI components</a> library can be used with all features supported by the Blazor framework. In this blog post, we are going to explore Syncfusion Blazor components on a cross-platform desktop app using the <a href="https://www.electronjs.org/">Electron</a> framework.</p><p>Electron supports building cross-platform desktop applications with web technologies. It utilizes Node.js and the Chromium rendering engine to run a web application on a desktop shell.</p><h3>Prerequisites</h3><ul><li><a href="https://dotnet.microsoft.com/download/dotnet-core/3.1">.NET Core SDK 3.1</a> or <a href="https://dotnet.microsoft.com/download/dotnet/5.0">.NET 5.0 SDK</a></li><li><a href="https://nodejs.org/en/">Node.js</a></li></ul><h3>Create a Blazor server-side application using dotnet-cli</h3><p>Follow these steps to create a Blazor server-side app using dotnet-cli:</p><p><strong>Step 1: </strong>First, open the command prompt in any folder. Then, run the following command line to create a new Blazor server-side application without HTTPS support. I am naming the application <strong>BlazorElectronApp</strong>.</p><pre>dotnet new blazorserver --no-https -o BlazorElectronApp</pre><p><strong>Step 2:</strong> Navigate to the application folder (BlazorElectronApp) and install the required <a href="https://blazor.syncfusion.com/documentation/nuget-packages/#available-nuget-packages">Syncfusion Blazor NuGet</a> package.</p><p>For this blog, we are going to use the <a href="https://www.nuget.org/packages/Syncfusion.Blazor.Grid/">Syncfusion.Blazor.Grid</a> NuGet package.</p><pre>cd BlazorElectronApp <br>dotnet add package Syncfusion.Blazor.Grid</pre><p><strong>Step3:</strong> Then, open the <strong>~/Startup.cs</strong> file from the application and add the Syncfusion Blazor Service in the <strong>ConfigureServices</strong> method, like in the following code example.</p><pre>using Syncfusion.Blazor;</pre><pre>public class Startup</pre><pre>{</pre><pre>……</pre><pre>……</pre><pre>public void ConfigureServices(IServiceCollection services)</pre><pre>{</pre><pre>……</pre><pre>……</pre><pre>services.AddSyncfusionBlazor();</pre><pre>}</pre><pre>}</pre><p><strong>Step 4:</strong> Now, open the <strong>~/Pages/_Host.cshtml </strong>file and add the Syncfusion theme reference in the &lt;head&gt; tag. Refer to the following code example.</p><pre>@page &quot;/&quot;</pre><pre>……</pre><pre>……</pre><pre>&lt;!DOCTYPE html&gt;</pre><pre>&lt;html lang=&quot;en&quot;&gt;</pre><pre>&lt;head&gt;</pre><pre>……</pre><pre>……</pre><pre>&lt;link href=&quot;_content/Syncfusion.Blazor.Themes/bootstrap4.css&quot; rel=&quot;stylesheet&quot; /&gt;</pre><pre>&lt;/head&gt;</pre><pre>……</pre><pre>……</pre><pre>&lt;/html&gt;</pre><p><strong>Step 5:</strong> Finally, add the Syncfusion Blazor DataGrid component in the <strong>~/Pages/Index.razor</strong> page. Refer to the following code example.</p><pre>@page &quot;/&quot;</pre><pre>@using Syncfusion.Blazor.Grids</pre><pre>&lt;SfGrid DataSource=&quot;@Orders&quot; AllowPaging=&quot;true&quot;&gt;</pre><pre>&lt;GridPageSettings PageSize=&quot;5&quot;&gt;&lt;/GridPageSettings&gt;</pre><pre>&lt;GridColumns&gt;</pre><pre>&lt;GridColumn Field=@nameof(Order.OrderID) HeaderText=&quot;Order ID&quot; TextAlign=&quot;TextAlign.Right&quot; Width=&quot;120&quot;&gt;&lt;/GridColumn&gt;</pre><pre>&lt;GridColumn Field=@nameof(Order.CustomerID) HeaderText=&quot;Customer Name&quot; Width=&quot;150&quot;&gt;&lt;/GridColumn&gt;</pre><pre>&lt;GridColumn Field=@nameof(Order.OrderDate) HeaderText=&quot; Order Date&quot; Format=&quot;d&quot; Type=&quot;ColumnType.Date&quot; TextAlign=&quot;TextAlign.Right&quot; Width=&quot;130&quot;&gt;&lt;/GridColumn&gt;</pre><pre>&lt;GridColumn Field=@nameof(Order.Freight) HeaderText=&quot;Freight&quot; Format=&quot;C2&quot; TextAlign=&quot;TextAlign.Right&quot; Width=&quot;120&quot;&gt;&lt;/GridColumn&gt;</pre><pre>&lt;/GridColumns&gt;</pre><pre>&lt;/SfGrid&gt;</pre><pre>@code{</pre><pre>public List&lt;Order&gt; Orders { get; set; }</pre><pre>protected override void OnInitialized()</pre><pre>{</pre><pre>Orders = Enumerable.Range(1, 25).Select(x =&gt; new Order()</pre><pre>{</pre><pre>OrderID = 1000 + x,</pre><pre>CustomerID = (new string[] { &quot;ALFKI&quot;, &quot;ANANTR&quot;, &quot;ANTON&quot;, &quot;BLONP&quot;, &quot;BOLID&quot; })[new Random().Next(5)],</pre><pre>Freight = 2.1 * x,</pre><pre>OrderDate = DateTime.Now.AddDays(-x),</pre><pre>}).ToList();</pre><pre>}</pre><pre>public class Order {</pre><pre>public int? OrderID { get; set; }</pre><pre>public string CustomerID { get; set; }</pre><pre>public DateTime? OrderDate { get; set; }</pre><pre>public double? Freight { get; set; }</pre><pre>}</pre><pre>}</pre><p>Now, the created Blazor server-side application with the Syncfusion DataGrid component is ready to launch without the Electron setup.</p><h3>Configure the Electron setup in application</h3><p>Please follow these steps to configure the Electron setup into the Blazor server-side application:</p><p><strong>Step 1:</strong> First, install the <a href="https://www.nuget.org/packages/ElectronNET.API/">ElectronNET.API</a> NuGet package in the application. <a href="https://github.com/ElectronNET/Electron.NET">Electron.NET</a> is a wrapper for the Electron application with embedded .NET API.</p><pre>dotnet add package ElectronNET.API</pre><p><strong>Step 2:</strong> Next, create a local .NET tool manifest file by running the following command line. This will create a manifest file in the <strong>~/.config/dotnet-tools.json</strong> location.</p><pre>dotnet new tool-manifest</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*_jnIK_ibGE6aKUrV.png" /></figure><p><strong>Step 3:</strong> Then, install the electronize tool locally in the project by running the following command line.</p><pre>dotnet tool install ElectronNET.CLI</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*NytlzikbWGfmlffw.png" /></figure><p><strong>Step 4:</strong> Run the following command to configure the Electron.NET manifest and update the application launch profiles.</p><pre>dotnet electronize init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*CkPuQq3dmjrMddaP.png" /></figure><p><strong>Step 5:</strong> Now, integrate the Electron.NET in the <strong>~/Program.cs</strong> file. Refer to the following code example.</p><pre>using ElectronNET.API;</pre><pre>public class Program</pre><pre>{</pre><pre>.....</pre><pre>.....</pre><pre>public static IHostBuilder CreateHostBuilder(string[] args) =&gt;</pre><pre>Host.CreateDefaultBuilder(args)</pre><pre>.ConfigureWebHostDefaults(webBuilder =&gt;</pre><pre>{</pre><pre>webBuilder.UseElectron(args);</pre><pre>webBuilder.UseStartup&lt;Startup&gt;();</pre><pre>});</pre><pre>}</pre><p><strong>Step 6:</strong> Then, add this code in the <strong>~/Startup.cs</strong> file to open the Electron window.</p><pre>using ElectronNET.API;</pre><pre>public class Startup</pre><pre>{</pre><pre>……</pre><pre>……</pre><pre>public void Configure(IApplicationBuilder app, IWebHostEnvironment env)</pre><pre>{</pre><pre>……</pre><pre>……</pre><pre>// Open the Electron-Window</pre><pre>Task.Run(async () =&gt; await Electron.WindowManager.CreateWindowAsync());</pre><pre>}</pre><pre>}</pre><p><strong>Step 7:</strong> Now, run the application using the following command line.</p><pre>dotnet electronize start</pre><p><strong>Note:</strong> The electronize start will take some time for its initial launch. But it will be fast in subsequent launches.</p><p>Then, our Blazor server-side application will open in the cross-platform desktop Electron shell with the DataGrid component.</p><figure><img alt="Syncfusion Blazor DataGrid in Desktop Electron Shell" src="https://cdn-images-1.medium.com/max/624/0*AsHOUanLkgzQEfSe.png" /><figcaption>Syncfusion Blazor DataGrid in Desktop Electron Shell</figcaption></figure><p><strong>Step 8:</strong> Finally, run these command lines to do production builds based on platform.</p><pre>dotnet electronize build /target win <br>dotnet electronize build /target osx <br>dotnet electronize build /target linux</pre><h3>GitHub reference</h3><p>For more information, refer to the complete working example, <a href="https://github.com/syncfusionexamples/blazor-electron-app">Exploring Syncfusion Blazor components on a cross-platform desktop app using Electron</a>.</p><h3>Conclusion</h3><p>Thanks for reading! In this blog post, we have seen the steps to integrate Syncfusion <a href="https://www.syncfusion.com/blazor-components">Blazor components</a> in a cross-platform desktop app using the Electron framework. Try out the steps given in this blog post and leave your feedback in the comments section.</p><p>The Syncfusion Blazor suite offers over 65 high-performance, lightweight, and responsive UI components for the web, including file-format libraries, in a single package. Use them to build stunning web applications!</p><p>For existing customers, the new version is available for download from the <a href="https://www.syncfusion.com/account/downloads">License and Downloads</a> page. If you are not yet a Syncfusion customer, you can try our 30-day <a href="https://www.syncfusion.com/downloads">free trial</a> to check out our available features. Also, try our samples from this <a href="https://github.com/syncfusion">GitHub</a> location.</p><p>You can contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://www.syncfusion.com/support/directtrac/incidents">Direct-Trac</a>, or <a href="https://www.syncfusion.com/feedback/flutter">feedback portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/whats-new-in-2021-volume-1-blazor.aspx">What’s New in 2021 Volume 1: Blazor</a></li><li><a href="https://www.syncfusion.com/blogs/post/3-blazor-hosting-models.aspx">3 Different Hosting Models in Blazor</a></li><li><a href="https://www.syncfusion.com/blogs/post/easy-steps-create-a-blazor-server-app-with-authentication.aspx">Easy Steps to Create a Blazor Server App with Authentication</a></li><li><a href="https://www.syncfusion.com/blogs/post/blazor-hybrid-apps-using-mobile-blazor-bindings.aspx">Exploring Blazor Hybrid App using Mobile Blazor Bindings</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/exploring-syncfusion-blazor-components-on-cross-platform-desktop-apps-using-electron.aspx"><em>https://www.syncfusion.com</em></a><em> on May 6, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cff56d2f75d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/exploring-syncfusion-blazor-components-on-cross-platform-desktop-apps-using-electron-1cff56d2f75d">Exploring Syncfusion Blazor Components on Cross-Platform Desktop Apps Using Electron</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>