<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Formula Math, Trigonometric Functions (Sine, Cosine and Tangent) in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Formula-Math-Trigonometric-Functions-Sine-Cosine-and-Tangent/m-p/1144892#M42936</link>
    <description>&lt;P&gt;I like SVG,&lt;BR /&gt;&lt;BR /&gt;you can build nice frontend Artworks with it.&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;But to effectively create and calculate circle graphs; trigonometry is required. &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Java and JavaScript have it in the math library. &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;But it's missing in HubL.&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;BR /&gt;Example: I have a pie chart (circle) and I want to arrange individual pie slices (segments) radially outward from the center at equal angles around the center.&amp;nbsp;To&amp;nbsp;&lt;SPAN&gt;Calculate the angles&amp;nbsp;you need: Sine, Cosine and/or Tangent.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for upvotes!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In addition to this:&lt;BR /&gt;&lt;A href="https://knowledge.hubspot.com/workflows/custom-formula-functions" target="_blank" rel="noopener"&gt;https://knowledge.hubspot.com/workflows/custom-formula-functions&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 06 May 2025 10:11:27 GMT</pubDate>
    <dc:creator>mii</dc:creator>
    <dc:date>2025-05-06T10:11:27Z</dc:date>
    <item>
      <title>Formula Math, Trigonometric Functions (Sine, Cosine and Tangent)</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Formula-Math-Trigonometric-Functions-Sine-Cosine-and-Tangent/m-p/1144892#M42936</link>
      <description>&lt;P&gt;I like SVG,&lt;BR /&gt;&lt;BR /&gt;you can build nice frontend Artworks with it.&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;But to effectively create and calculate circle graphs; trigonometry is required. &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Java and JavaScript have it in the math library. &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;But it's missing in HubL.&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;BR /&gt;Example: I have a pie chart (circle) and I want to arrange individual pie slices (segments) radially outward from the center at equal angles around the center.&amp;nbsp;To&amp;nbsp;&lt;SPAN&gt;Calculate the angles&amp;nbsp;you need: Sine, Cosine and/or Tangent.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for upvotes!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In addition to this:&lt;BR /&gt;&lt;A href="https://knowledge.hubspot.com/workflows/custom-formula-functions" target="_blank" rel="noopener"&gt;https://knowledge.hubspot.com/workflows/custom-formula-functions&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 10:11:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Formula-Math-Trigonometric-Functions-Sine-Cosine-and-Tangent/m-p/1144892#M42936</guid>
      <dc:creator>mii</dc:creator>
      <dc:date>2025-05-06T10:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Math, Trigonometric Functions (Sine, Cosine and Tangent)</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Formula-Math-Trigonometric-Functions-Sine-Cosine-and-Tangent/m-p/1144996#M42938</link>
      <description>&lt;P&gt;Hey &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/98364"&gt;@mii&lt;/a&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; This is a fantastic suggestion. Can you please repost it over in the Ideas Forum? That way it will get in front of the right eyes. — Jaycee&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 13:52:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Formula-Math-Trigonometric-Functions-Sine-Cosine-and-Tangent/m-p/1144996#M42938</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-05-06T13:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Math, Trigonometric Functions (Sine, Cosine and Tangent)</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Formula-Math-Trigonometric-Functions-Sine-Cosine-and-Tangent/m-p/1145050#M42944</link>
      <description>&lt;P&gt;I'd suggest adding a element on the page using hubl/in the module, and then use javascript to create that svg.&lt;BR /&gt;&lt;BR /&gt;Also, there are plenty of libraries out there that do this type of work as well. Like&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;noted, posting this in the ideas is somethign you could do, but this is solvable with javsacript!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 15:39:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Formula-Math-Trigonometric-Functions-Sine-Cosine-and-Tangent/m-p/1145050#M42944</guid>
      <dc:creator>nickdeckerdevs1</dc:creator>
      <dc:date>2025-05-06T15:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Math, Trigonometric Functions (Sine, Cosine and Tangent)</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Formula-Math-Trigonometric-Functions-Sine-Cosine-and-Tangent/m-p/1145834#M42965</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/98364"&gt;@mii&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;great idea!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I've done a few times:&lt;/P&gt;
&lt;P&gt;Implementing&amp;nbsp;&lt;A href="https://www.chartjs.org/docs/latest/charts/doughnut.html#pie" target="_blank" rel="noopener"&gt;chart.js&lt;/A&gt; and modifing it via HubL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A simple example for the module.html:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;div&amp;gt;
  &amp;lt;canvas id="myChart"&amp;gt;&amp;lt;/canvas&amp;gt;
&amp;lt;/div&amp;gt;

{% require_js %}
&amp;lt;script src="https://cdn.jsdelivr.net/npm/chart.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script&amp;gt;
  const ctx = document.getElementById('myChart');

  new Chart(ctx, {
    type: 'pie',
    data = {
  labels: [
    {% for data in module.pie_data %}
       {{ data.label }}{% unless loop.last %},{% endunless %}
    {% endfor %}
  ],
  datasets: [{
    data: [
       {% for data in module.pie_data %}
          {{ data.amount }}{% unless loop.last %},{% endunless %}
       {% endfor %}],
    backgroundColor: [
      {% for data in module.pie_data %}
       {{ data.color }}{% unless loop.last %},{% endunless %}
    {% endfor %}
    ],
    hoverOffset: {{ module.styles.pie_settings.offset }}
  }]
};
  });
&amp;lt;/script&amp;gt;
{% end_require_js %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 07:07:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Formula-Math-Trigonometric-Functions-Sine-Cosine-and-Tangent/m-p/1145834#M42965</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2025-05-08T07:07:07Z</dc:date>
    </item>
  </channel>
</rss>

