<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abhijeet Pratap Singh.</title>
    <description>The latest articles on DEV Community by Abhijeet Pratap Singh. (@notesmatic).</description>
    <link>https://dev.to/notesmatic</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1112350%2Fef6241e6-967c-43ac-9027-1b52e5083307.jpg</url>
      <title>DEV Community: Abhijeet Pratap Singh.</title>
      <link>https://dev.to/notesmatic</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/notesmatic"/>
    <language>en</language>
    <item>
      <title>Create charts with chart.js</title>
      <dc:creator>Abhijeet Pratap Singh.</dc:creator>
      <pubDate>Fri, 03 May 2024 01:21:50 +0000</pubDate>
      <link>https://dev.to/notesmatic/create-charts-with-chartjs-1dda</link>
      <guid>https://dev.to/notesmatic/create-charts-with-chartjs-1dda</guid>
      <description>&lt;p&gt;Chart.JS is the best javascript based open source charting library you can use to draw a large variety of charts including simple line and bar to more complex mixed and bubble charts or radar charts. You do not need to be a master of js to use chart.js because the library is simple to use and provides extensive customizations to make beautiful charts with the help of plugins.&lt;/p&gt;

&lt;p&gt;Plugins like &lt;a href="https://abhijeetpratap.com/posts/datalabels-chart-js/"&gt;datalabels&lt;/a&gt;, &lt;a href="https://abhijeetpratap.com/posts/customize-chartjs-tooltip/"&gt;tooltip&lt;/a&gt; and &lt;a href="https://abhijeetpratap.com/posts/title-and-subtitle-chart.js/"&gt;title&lt;/a&gt; can help you customize and make your charts more attractive while also more informative. Customizations and animations can help you draw and configure perfect looking charts. For example, you want to draw a simple bar chart but want to assign a different color to each bar, you do not need to do much work but simply using the backgroundColors variable you can assign a unique color to each of the several bars in your chart.&lt;br&gt;
&lt;strong&gt;Why use chart.js?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chart.js is easy to learn.&lt;/li&gt;
&lt;li&gt;Can be easily included in html.&lt;/li&gt;
&lt;li&gt;It is easy to install - you can use npm or the cdn link to install it.&lt;/li&gt;
&lt;li&gt;Creating and configuring charts is much easier with chart,js compared to the other libraries.&lt;/li&gt;
&lt;li&gt;It is the most popular js based charting library based on number of Github stars and downloads.&lt;/li&gt;
&lt;li&gt;Plugins allow you to extend chart functionality&lt;/li&gt;
&lt;li&gt;There is enough documentation and community support available to guide you.&lt;/li&gt;
&lt;li&gt;Chart types can be changed with simple changes.&lt;/li&gt;
&lt;li&gt;It is easy to draw charts with chart.js even with very large datasets.&lt;/li&gt;
&lt;li&gt;You can easily set bar thickness and height depending on the size of your dataset.
Ok, So let's try creating a simple bar chart with the help of chart.js. Let's see how easy or difficult it is to draw charts using chart.js.
There are three main parts to creating the chart. First, we install the library using the cdn link or npm. Second, we draw a canvas for our chart and third we include the script to create the chart.
If you want to install it on your server, here is the command:
npm install chart.js&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want, you can add the script to install the chart to your website's html head (before /head) and you can start creating charts on your website.&lt;br&gt;
Here is the script to install the latest version (4.4.1):&lt;br&gt;
&lt;code&gt;&amp;lt;script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.min.js" integrity="sha512-L0Shl7nXXzIlBSUUPpxrokqq4ojqgZFQczTYlGjzONGTDAcLremjwaWv5A+EDLnxhQzY5xUZPWLOLqYRkY0Cbw==" crossorigin="anonymous" referrerpolicy="no-referrer"&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;br&gt;
Now, that we have installed the charting library, we will first need to draw the canvas for our chart, which can be included inside a div element:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;div&amp;gt;&lt;br&gt;
  &amp;lt;canvas id="myChart"&amp;gt;&amp;lt;/canvas&amp;gt;&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Simple? The canvas is followed by the script to load the real chart. Check how the final script looks:&lt;/p&gt;

&lt;p&gt;const ctx = document.getElementById('myChart');&lt;/p&gt;

&lt;p&gt;new Chart(ctx, {&lt;br&gt;
    type: 'bar',&lt;br&gt;
    data: {&lt;br&gt;
      labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],&lt;br&gt;
      datasets: [{&lt;br&gt;
        label: '# of Votes',&lt;br&gt;
        data: [12, 19, 3, 5, 2, 3],&lt;br&gt;
        borderWidth: 1&lt;br&gt;
      }]&lt;br&gt;
    },&lt;br&gt;
    options: {&lt;br&gt;
      scales: {&lt;br&gt;
        y: {&lt;br&gt;
          beginAtZero: true&lt;br&gt;
        }&lt;br&gt;
      }&lt;br&gt;
    }&lt;br&gt;
  });&lt;/p&gt;

&lt;p&gt;The data is added inside the datasets and it is easy to change the bar type by setting the type. For example, if you want the above chart to render a line chart instead of a bar chart, just change the chart type to line:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;type: 'line',&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
That's all. Now, you will have a line chart instead of a bar chart. You can customize the background colors according to your need. By default, the chart will apply five or six different colors to your bars in sequence. If you are just starting out with chart.js, you can try changing the values for data and labels and see how it outputs an awesome looking chart. There are a lot more configurations and customizations you can learn from the chartjs.org website. The above script is just a sample. You can add a lot more customizations to it including datalabels, custom tooltip and so on. You can aslo extend the dataset to include many more items and still the chart will render very fast and without any issues.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Analyze/Diagnose and Recover from a Website Traffic/Impressions Drop</title>
      <dc:creator>Abhijeet Pratap Singh.</dc:creator>
      <pubDate>Mon, 08 Apr 2024 17:52:25 +0000</pubDate>
      <link>https://dev.to/notesmatic/how-to-analyzediagnose-and-recover-from-a-website-trafficimpressions-drop-13b</link>
      <guid>https://dev.to/notesmatic/how-to-analyzediagnose-and-recover-from-a-website-trafficimpressions-drop-13b</guid>
      <description>&lt;p&gt;So, your website experienced a sudden decline in the number of impressions/clicks. You are worried about what to do and how to recover from the situation.&lt;/p&gt;

&lt;p&gt;There are many factors that can affect the number of impressions per day and can cause a sudden decline. However, it is not impossible to recover from it.&lt;/p&gt;

&lt;p&gt;First of all, check if Google made a &lt;a href="https://abhijeetpratap.com/posts/google-march-2024-core-update/"&gt;recent core update&lt;/a&gt;. If there has been an update and your site has been hit, check Google’s new guidelines and adjust your content strategy accordingly.&lt;/p&gt;

&lt;p&gt;Focus on creating original and high quality content that offers unique value to users. Google is /penalizing content that is of mediocre quality/spam. Such content can be deindexed without any warning.&lt;/p&gt;

&lt;p&gt;Check if there has been a manual action. You can find it out from your Google search console account.&lt;/p&gt;

&lt;p&gt;Compare the Google search console data with the data for previous year to look for a seasonal patterns.&lt;/p&gt;

&lt;p&gt;Check if you made a recent update to your website. Suppose, you added a piece of code manually yo your website or just changed your theme or installed a new plugin. Sometimes plugin conflicts or theme conflict can also hurt impressions and traffic. Try reverting these changes and waiting a few days. You can also switch to a Wordpress core theme if you are using Wordpress.&lt;/p&gt;

&lt;p&gt;Did you make any changes to your server configurations or robots.txt? Check if any update to your &lt;strong&gt;server configurations/robots.txt/.htaccess file&lt;/strong&gt; is causing an issue. In several cases, it is some technical issue that causes a sudden drop in traffic and reverting those changes brings the traffic back. Check out your DNS settings also.&lt;/p&gt;

&lt;p&gt;How old is your website? If it is a fairly new website that is just a few months old, you will need to wait since Google might take some time to analyze the website fully and include it in search results. In the meantime add more good quality content to your website and focus on improving your backlink profile to bring traffic to your website. Social media sharing can also help improve visibility.&lt;/p&gt;

&lt;p&gt;Continue to watch for changes in the Google search console and make improvements according to suggestions provided by Google. Keep a watch on your backlink profile inside the search console and see if you recently lost any valuable backlinks. You can also use tools like Semrush and Ahrefs to analyze backlinks and website ranking changes.&lt;/p&gt;

&lt;p&gt;Focus on &lt;strong&gt;E-E-A-T. Experience, Expertise, Authoritativeness and Trust&lt;/strong&gt;. These are important factors that Google considers to rank websites. Include a about us page on your website and showcase your expertise.&lt;/p&gt;

&lt;p&gt;Check if your website provides a good user experience. continuously audit your website and optimize it to provide an excellent user experience.&lt;/p&gt;

&lt;p&gt;At last, rather than focusing on keyword optimization, try writing original content that provides real value to visitors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;User experience is important and make sure that your website is fast and provides a good user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Focus on quality and not quantity. The latest core update by Google (March 2024) penalizes websites that generate low quality content at scale using automation/AI tools, humans or a mix of the two. Low quality content can be deindexed by Google. Google has adopted a no spam policy which could lead to removal of around 40% such websites from searches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rather than spending time on keyword optimization and manipulating SEO for rankings, spend time creating high quality and original content.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://abhijeetpratap.com/posts/analyze-and-recover-from-traffic-impressions-drop/"&gt;How to Analyze and Regain Lost Traffic&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
