<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Charts &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/charts/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Tue, 31 Mar 2026 15:22:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>More New Features for Android: MobileChart, MobileColorPicker, MobilePDFViewer &#038; Zip/Unzip</title>
		<link>https://blog.xojo.com/2026/03/31/more-new-features-for-android/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 15:22:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Unzip]]></category>
		<category><![CDATA[Zip]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16035</guid>

					<description><![CDATA[The first release of 2026 brings some notable new features to Xojo’s Android support. You’ll find new charting, color-picking, PDF viewing, and file-zip utilities, plus&#8230;]]></description>
										<content:encoded><![CDATA[
<p>The first release of 2026 brings some notable new features to Xojo’s Android support. You’ll find new charting, color-picking, PDF viewing, and file-zip utilities, plus ongoing improvements to several controls. Here’s a quick tour of what’s new.</p>



<h2 class="wp-block-heading"><strong>MobileChart</strong></h2>



<p>Matching the features available for iOS, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilechart.html#mobilechart" target="_blank" rel="noreferrer noopener">MobileChart</a> lets you create a wide variety of charts to show in your Android app.</p>



<figure class="wp-block-image size-large is-resized"><img fetchpriority="high" decoding="async" width="483" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-483x1024.png" alt="" class="wp-image-16036" style="width:198px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-483x1024.png 483w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-142x300.png 142w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-768x1628.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-725x1536.png 725w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x.png 918w" sizes="(max-width: 483px) 100vw, 483px" /></figure>



<h2 class="wp-block-heading"><strong>MobileColorPicker</strong></h2>



<p>This new control, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilecolorpicker.html#mobilecolorpicker" target="_blank" rel="noreferrer noopener">as its name suggests</a>, lets you use the system color picker to select a color.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="481" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-481x1024.png" alt="" class="wp-image-16038" style="width:202px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-481x1024.png 481w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-141x300.png 141w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-768x1634.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-722x1536.png 722w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x.png 912w" sizes="(max-width: 481px) 100vw, 481px" /></figure>



<h2 class="wp-block-heading"><strong>MobilePDFViewer</strong></h2>



<p>Last year Android added <a href="https://documentation.xojo.com/api/pdf/pdfdocument.html#pdfdocument" target="_blank" rel="noreferrer noopener">PDFDocument</a> support for creating your own PDFs, and now we’ve added <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilepdfviewer.html#methods" target="_blank" rel="noreferrer noopener">MobilePDFViewer</a> to give you an easy way to show PDF document files from your Android apps.</p>



<h2 class="wp-block-heading"><strong>Zip/Unzip</strong></h2>



<p>The FolderItem class now supports the <a href="https://documentation.xojo.com/api/files/folderitem.html#folderitem-zip" target="_blank" rel="noreferrer noopener">Zip</a> and <a href="https://documentation.xojo.com/api/files/folderitem.html#folderitem-unzip" target="_blank" rel="noreferrer noopener">Unzip</a> methods to make it simple to compress and uncompressed Zip files.</p>



<h2 class="wp-block-heading"><strong>Android Keeps Getting Better</strong></h2>



<p>There are also improvements to <a href="https://documentation.xojo.com/api/user_interface/mobile/mobiletabpanel.html#mobiletabpanel" target="_blank" rel="noreferrer noopener">MobileTabPanel</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobiletextarea.html#mobiletextarea" target="_blank" rel="noreferrer noopener">MobileTextArea</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobileslider.html#mobileslider" target="_blank" rel="noreferrer noopener">MobileSlider</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilescrollablearea.html#mobilescrollablearea" target="_blank" rel="noreferrer noopener">MobileScrollableArea</a>, <a href="https://documentation.xojo.com/api/hardware/barcode.html#barcode" target="_blank" rel="noreferrer noopener">Barcode</a> and more. With each release, Android gets closer to feature parity with iOS!</p>



<p>And of course, we continue to squash framework and compiler bugs.</p>



<p>Be sure to check out the full <a href="https://documentation.xojo.com/resources/release_notes/2026r1.html" target="_blank" rel="noreferrer noopener">release notes</a> for all the details!</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Scatter Chart: Connecting the Points</title>
		<link>https://blog.xojo.com/2026/02/09/scatter-chart-connecting-the-points/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Mon, 09 Feb 2026 16:26:56 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Charts]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15826</guid>

					<description><![CDATA[A user recently asked whether it’s possible to connect the (x, y) points in a Scatter chart using DesktopChart, and if so, how to do&#8230;]]></description>
										<content:encoded><![CDATA[
<p>A user recently asked whether it’s possible to connect the (x, y) points in a Scatter chart using DesktopChart, and if so, how to do it. The short answer is yes, it is possible. Read on and I’ll show you just how easy it is.</p>



<span id="more-15826"></span>



<p>For this example, we’ll use the x and y coordinate values of the sine and cosine functions as the data for our scatter DataSets. Go ahead and create a new Desktop project in the Xojo IDE.</p>



<p>Next, select the default Window1 and drag a DesktopChart control from the Library panel into the Layout Editor for Window1. Adjust the right margin to the recommended right layout guide, then lock the Top, Left, and Right layout locks for the Chart1 instance using the Inspector. At this point, your design should look similar to this:</p>



<figure class="wp-block-image"><img decoding="async" width="2560" height="1800" src="https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-scaled.png" alt="" class="wp-image-15827" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-scaled.png 2560w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-300x211.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-1024x720.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-768x540.png 768w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-1536x1080.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-2048x1440.png 2048w" sizes="(max-width: 2560px) 100vw, 2560px" /></figure>



<p>While you’re there, select Chart1 and, in the Inspector, set the option Behavior &gt; Mode to Scatter.</p>



<p>Next, with Window1 selected, add two properties using the following values:</p>



<p><strong>Property 1:</strong></p>



<ul class="wp-block-list">
<li><strong>Name:</strong> CosStyle</li>



<li><strong>Type:</strong> ChartLinearStyle</li>



<li><strong>Scope:</strong> Private</li>
</ul>



<p><strong>Property 2</strong></p>



<ul class="wp-block-list">
<li><strong>Name:</strong> SineStyle</li>



<li><strong>Type:</strong> ChartLinearStyle</li>



<li><strong>Scope:</strong> Private</li>
</ul>



<p>These properties will be used to store references to the Style objects associated with the cosine and sine function DataSets.</p>



<p>Finally, with Window1 still selected, add the Opening event and enter the following lines of code into the associated code editor:</p>



<pre class="wp-block-preformatted">CosStyle = New ChartLinearStyle<br>CosStyle.Line = ChartLinearStyle.LineTypes.Dashed<br><br>SineStyle = New ChartLinearStyle<br>SineStyle.Line = ChartLinearStyle.LineTypes.Solid<br><br>DrawScatterChart</pre>



<p>In brief, this code creates new ChartLinearStyle instances for the properties added earlier. It assigns a solid line style to connect the cosine function data points and a dashed line style to connect the sine function data points. After that, it calls the DrawScatterChart method, which is responsible for rendering the sine and cosine functions on the Chart1 instance.</p>



<p>Now, let’s create that method on Window1 using the following values in the Inspector:</p>



<ul class="wp-block-list">
<li><strong>Name:</strong> DrawScatterChart</li>



<li><strong>Scope:</strong> Private</li>
</ul>



<p>Type the following snippet of code in the associated Code Editor for the method:</p>



<pre class="wp-block-code"><code>// These are the Array variables in charge of storing the Scatter data points
// for the Sine and Cosine functions
Var sinePoints() As ChartScatterDatapoint
Var cosinePoints() As ChartScatterDatapoint

// …and these variables will handle the DataSet instances
// for the previous arrays of data points on both functions
Var sineDataSet As ChartScatterDataset
var cosDataSet As ChartScatterDataset

Const pi = 3.14159265359
Var y As Double
Var maxXValue As Double = 2.0 * pi

// Using a simple loop to feed the x and y
// values for the Sine and Cosine
For x As Double = 0.0 To maxXValue Step 0.5
  
  y = Sin(x)
  sinePoints.Add(New ChartScatterDatapoint(x, y, 1))
  
  y = Cos(x)
  cosinePoints.Add(new ChartScatterDatapoint(x, y, 1))
  
Next

// Next, we create the new instances for the Scatter DataSets
sineDataSet = New ChartScatterDataset(Color.Blue, sinePoints)
cosDataSet = New ChartScatterDataset(color.Red, cosinePoints)

// …and we set the Style to be used on each of them
sineDataSet.Style = SineStyle
cosDataSet.Style = CosStyle

// … and of course the labels to be shown on the Legend section
// of the chart itself
sineDataSet.Label = "Sine Function"
cosDataSet.Label = "Cos Function"

// As the last step, we add both DataSets to the chart
// so these can be rendered
Chart1.AddDatasets(sineDataSet, cosDataSet)</code></pre>



<p>Run the app, and it should look similar to this:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1424" height="1088" src="https://blog.xojo.com/wp-content/uploads/2026/02/Chart2.png" alt="" class="wp-image-15828" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Chart2.png 1424w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart2-300x229.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart2-1024x782.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart2-768x587.png 768w" sizes="auto, (max-width: 1424px) 100vw, 1424px" /></figure>



<h2 class="wp-block-heading">A change of Style… on the fly!</h2>



<p>As with many aspects of DesktopChart, any changes made at runtime are reflected immediately, without the need to redraw the chart, re-feed the data sets, or perform any other complex operations. Let’s take advantage of this by changing the sine and cosine styles at runtime, allowing users of our example app to toggle whether the points are connected.</p>



<p>Add two DesktopCheckBox controls below the bottom margin of the Chart1 instance on Window1. Set the Caption of the first checkbox to “Connect Sine Points” and the second to “Connect Cos Points.” For both checkboxes, use the Inspector to set Initial State &gt; Visual State to Checked.</p>



<p>The final layout should look similar to this:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1292" height="954" src="https://blog.xojo.com/wp-content/uploads/2026/02/Chart3.png" alt="" class="wp-image-15829" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Chart3.png 1292w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart3-300x222.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart3-1024x756.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart3-768x567.png 768w" sizes="auto, (max-width: 1292px) 100vw, 1292px" /></figure>



<p>Lastly, add the ValueChanged event to both CheckBox instances. Then, for the checkbox with the caption “Connect Sine Points,” add the following lines of code to its event handler:</p>



<pre class="wp-block-code"><code>If Me.Value Then
  SineStyle.Line = ChartLinearStyle.LineTypes.Dashed
Else
  SineStyle.Line = ChartLinearStyle.LineTypes.None
End If</code></pre>



<p>Add the following lines of code to the ValueChanged event handler for the checkbox with the caption “Connect Cos Points”:</p>



<pre class="wp-block-code"><code>If Me.Value Then
  CosStyle.Line = ChartLinearStyle.LineTypes.Solid
Else
  CosStyle.Line = ChartLinearStyle.LineTypes.None
End If</code></pre>



<p>Run the app again and, this time, click each checkbox to see how the points are no longer connected when a checkbox is unchecked, and are connected when it is selected.</p>



<figure class="wp-block-video"><video controls src="https://blog.xojo.com/wp-content/uploads/2026/02/Grabacion-de-pantalla-2026-02-02-a-las-13.53.35.mp4"></video></figure>



<h2 class="wp-block-heading">Summary</h2>



<p>As you can see, styles can be used not only to connect points in a Scatter chart, but also to customize the point endpoints beyond the default appearance. For example, you can set the endpoint to “None” or choose from many other available options. Even better, any changes made to a style at runtime are applied immediately.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2026/02/Grabacion-de-pantalla-2026-02-02-a-las-13.53.35.mp4" length="171622" type="video/mp4" />

			</item>
		<item>
		<title>Year of Code 2025: July Project, Charting</title>
		<link>https://blog.xojo.com/2025/07/10/year-of-code-2025-july-project-charting/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Thu, 10 Jul 2025 18:32:31 +0000</pubDate>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Year of Code]]></category>
		<category><![CDATA[#YearofCode]]></category>
		<category><![CDATA[Charts]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15070</guid>

					<description><![CDATA[July&#8217;s Year of Code theme is charting.&#160;Charting uses the DesktopChart, WebChart or MobileChart controls to make your data stand out with visualizations like Bar, Bubble,&#8230;]]></description>
										<content:encoded><![CDATA[
<p>July&#8217;s Year of Code theme is charting.&nbsp;Charting uses the DesktopChart, WebChart or MobileChart controls to make your data stand out with visualizations like Bar, Bubble, Pie, Scatter charts and more.</p>



<p>For this project, I created a small iPhone app to track my expenses &#8211; something I personally needed.  While it&#8217;s designed for tracking holiday and travel spending, it works just as well for managing general monthly expenses.</p>



<span id="more-15070"></span>



<p>Far from perfect, but useful for the described scenarios, this iPhone app lets the user set a trip location, add a description and even define a budget. That way, they can check in at any time to see how things are going during a trip or when tracking general monthly expenses. (It doesn’t make much sense to offer this kind of app for iPad.)</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1195" height="2387" src="https://blog.xojo.com/wp-content/uploads/2025/06/1-MainScreen.png" alt="" class="wp-image-15071" srcset="https://blog.xojo.com/wp-content/uploads/2025/06/1-MainScreen.png 1195w, https://blog.xojo.com/wp-content/uploads/2025/06/1-MainScreen-150x300.png 150w, https://blog.xojo.com/wp-content/uploads/2025/06/1-MainScreen-513x1024.png 513w, https://blog.xojo.com/wp-content/uploads/2025/06/1-MainScreen-768x1534.png 768w, https://blog.xojo.com/wp-content/uploads/2025/06/1-MainScreen-769x1536.png 769w, https://blog.xojo.com/wp-content/uploads/2025/06/1-MainScreen-1025x2048.png 1025w" sizes="auto, (max-width: 1195px) 100vw, 1195px" /></figure>



<p>When it comes to entering new expenses, I wanted to keep it as simple as possible with minimal input and just a few taps.  So, aside from entering the amount and the place where the expense occurred, the app automatically captures the geolocation. This helps me better remember places like restaurants, gas stations or points of interest I might want to stop at or visit again when traveling the same route.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1191" height="2371" src="https://blog.xojo.com/wp-content/uploads/2025/06/2-AddingTripExpense.png" alt="" class="wp-image-15072" srcset="https://blog.xojo.com/wp-content/uploads/2025/06/2-AddingTripExpense.png 1191w, https://blog.xojo.com/wp-content/uploads/2025/06/2-AddingTripExpense-151x300.png 151w, https://blog.xojo.com/wp-content/uploads/2025/06/2-AddingTripExpense-514x1024.png 514w, https://blog.xojo.com/wp-content/uploads/2025/06/2-AddingTripExpense-768x1529.png 768w, https://blog.xojo.com/wp-content/uploads/2025/06/2-AddingTripExpense-772x1536.png 772w, https://blog.xojo.com/wp-content/uploads/2025/06/2-AddingTripExpense-1029x2048.png 1029w" sizes="auto, (max-width: 1191px) 100vw, 1191px" /></figure>



<p>When tracking monthly expenses, the app lets you duplicate existing entries so details like the expense location remain the same, and you only need to enter the new amount. This is especially handy if you tend to refuel at the same gas station or do your weekly grocery shopping at the same store.</p>



<p>So, what about charts? Honestly, this area has plenty of room for improvement and could eventually include a wide range of stats and visualizations. But for this initial release, I kept it simple to meet my own needs. In addition to the basic &#8216;Total Budget vs. Current Expenses&#8217; stats, the app includes a Pie chart that breaks down spending by category.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1217" height="2365" src="https://blog.xojo.com/wp-content/uploads/2025/06/4-Stats-Displayed.png" alt="" class="wp-image-15073" srcset="https://blog.xojo.com/wp-content/uploads/2025/06/4-Stats-Displayed.png 1217w, https://blog.xojo.com/wp-content/uploads/2025/06/4-Stats-Displayed-154x300.png 154w, https://blog.xojo.com/wp-content/uploads/2025/06/4-Stats-Displayed-527x1024.png 527w, https://blog.xojo.com/wp-content/uploads/2025/06/4-Stats-Displayed-768x1492.png 768w, https://blog.xojo.com/wp-content/uploads/2025/06/4-Stats-Displayed-790x1536.png 790w, https://blog.xojo.com/wp-content/uploads/2025/06/4-Stats-Displayed-1054x2048.png 1054w" sizes="auto, (max-width: 1217px) 100vw, 1217px" /></figure>



<p>Of course, you can <a href="https://github.com/aprendexojo/VoyageExpenses" target="_blank" rel="noreferrer noopener">download the full source code here</a> and adapt or improve it so it suits your own needs.</p>



<p>Want to give it a try? The iOS app is available for free on the App Store: <a href="https://apple.co/3EGL33r" target="_blank" rel="noreferrer noopener">https://apple.co/3EGL33r</a></p>



<p>VoyageExpenses is built entirely with Xojo. It&#8217;s 100% Xojo code, with only two small exceptions where Declares were needed. It was published to the App Store using the Publish feature introduced in Xojo 2025r1.</p>



<p>Visit the <a href="https://documentation.xojo.com/api/user_interface/controls/chart.html" target="_blank" rel="noreferrer noopener">Xojo Docs</a> to learn more about using charts in Xojo. Visual elements like charts can make the data in your apps more memorable and impactful.&nbsp;We&#8217;ve written extensively on charting throughout the <a href="https://blog.xojo.com/tag/charts/" target="_blank" rel="noreferrer noopener">Xojo Blog.</a></p>



<p><strong>Year of Code Project</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2025/01/09/year-of-code-2025-kickoff/">Year of Code: Kickoff</a></li>



<li><a href="https://blog.xojo.com/2025/01/15/year-of-code-2025-january-project/" target="_blank" rel="noreferrer noopener">January Project: Desktop Apps</a>&nbsp;|&nbsp;<a href="https://forum.xojo.com/t/year-of-code-2025-january-project-sharing/83927" target="_blank" rel="noreferrer noopener">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/02/11/year-of-code-2025-february-project/">February Project: Database Apps</a>&nbsp;|&nbsp;<a href="https://forum.xojo.com/t/2025-year-of-code-february" target="_blank" rel="noreferrer noopener">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/03/05/year-of-code-2025-march-project-web-apps/">March Project: Web Apps</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-march/84474?u=alyssa_foley">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/04/08/year-of-code-2025-april-project-user-interface/">April Project: User Interface</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-april-user-interface/84926">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/05/07/year-of-code-2025-may-project-mobile-apps/">May Project: Mobile Apps</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-may-is-mobile/85272">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/06/10/year-of-code-2025-june-project-cross-platform-code-class/">June Project: Code Sharing</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-june-is-code-sharing/85612">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/07/10/year-of-code-2025-july-project-charting/">July Project: Charting</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-july-is-charting/85896">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/08/07/year-of-code-2025-august-project-console-apps/">August Project: Console Apps</a> | <a href="https://forum.xojo.com/t/august-2025-year-of-code-console-apps/86203">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/09/08/year-of-code-2025-september-project-games/">September Project: Games</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-septgamer">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/10/13/year-of-code-2025-october-project-multi-platform-communication/">October Project: Multi-Platform</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-october-multi-platform-communication/86717">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/11/10/year-of-code-2025-november-project-pdf-postcard-generator/">November Project: PDF</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-november-pdf/86969">Forum Discussion</a></li>
</ul>



<p><strong>How to Play:</strong></p>



<p>Each month we&#8217;ll announce a new theme and share an example project of our own. Share your projects to the Xojo Forum thread for that month via GitHub (all the links you need are posted above ↑ ). Learn how to use <a href="https://blog.xojo.com/2024/04/02/using-xojo-and-github/">Xojo and GitHub</a>.</p>



<p><strong>The Prizes:</strong></p>



<p>Monthly winners get $100 at the Xojo store. Every month you submit a project is another chance to win the grand prize. The grand prize is $250 cash plus a Xojo Pro license and a year of GraffitiSuite and will be announce in December. Learn more about the <a href="https://blog.xojo.com/2025/01/09/year-of-code-2025-kickoff/#prizes">prizes</a>.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>More Control Over Your Charts</title>
		<link>https://blog.xojo.com/2024/12/10/more-control-over-your-charts/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 16:37:02 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r4]]></category>
		<category><![CDATA[Charts]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13985</guid>

					<description><![CDATA[Starting with Xojo 2024r4 the Chart feature provides even more control over how DataSets are drawn through new properties on Desktop, Web and iOS. Also,&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Starting with Xojo 2024r4 the Chart feature provides even more control over how DataSets are drawn through new properties on Desktop, Web and iOS. Also, for Desktop, the Chart control adds two new Event handlers to draw the datapoints of the chart in any way you want.</p>



<span id="more-13985"></span>



<h2 class="wp-block-heading">Granular Control on DataSets</h2>



<p>The ChartDataset subclasses add three new properties. Now you can choose to allow the interaction from the user (for example when clicking or taping on data points or over a displayed legend in the Chart), you can also choose what legends are visible at the top area of the Chart, as well as choosing to display a Popover when the user moves the mouse over a given rendered datapoint for the associated ChartDataset.</p>



<ul class="wp-block-list">
<li><strong>AllowInteraction</strong>: When it is set to False, then the displayed legend for the ChartDataset doesn&#8217;t respond to interaction (that is enabling/disabling the associated data in the Chart) or raises the Pressed event for the Chart. Also, it doesn&#8217;t fire the Pressed event when the user clicks on any of the rendered data points in the Chart for that particular DataSet.</li>



<li><strong>IsLegendVisible</strong>: When it is set to False, the Legend for the associated ChartDataset is not displayed at the top area of the Chart (always that the Chart.HasLegend property is set to True). This allows a more granular control over the legends that are displayed, so you can have some of the rendered data sets with their legend displayed while others not.</li>



<li><strong>AllowPopover</strong>: When this property is set to False in the ChartDataset, then the Popover won&#8217;t be displayed when the user hovers the cursor over any of its rendered points in the Chart.</li>
</ul>



<h2 class="wp-block-heading">New Events for Chart on Desktop</h2>



<p>Starting with Xojo 2024r4 you can decide how the Chart should draw the data points for any of the rendered ChartDatasets on Desktop. This is done by implementing the two new Event Handlers on the Chart instance:</p>



<ul class="wp-block-list">
<li><strong>DrawPointAt(g As Graphics, x As Double, y As Double, data As ChartDataSet, index As Integer) As Boolean</strong>. This event receives from the &#8220;g&#8221; parameter the graphic context for the datapoint, so you can use any of the available methods and properties of the Graphics class to draw the datapoint. In order to know what datapoint and from what ChartDataset, these are given in the &#8220;index&#8221; and &#8220;data&#8221; parameters, respectively. Also, the &#8220;x&#8221; and &#8220;y&#8221; parameters receive the coordinates for the top-left corner of the data point to be drawn. These coordinates are relatives to the Chart control instance position. Returning True from this Event means that your code handled the datapoint drawing; otherwise the datapoint will be rendered as usual.</li>



<li><strong>DrawMouseOverPointAt(g As Graphics, x As Double, y As Double, data As ChartDataSet, index As Integer) As Boolean</strong>. This event behaves in the same way as the previous one, the only difference is that it will be raised when the user hovers the cursor over a given datapoint, so you have the chance to decide how to draw the highlighted version of the datapoint.</li>
</ul>



<p>You can learn more about the Chart control in the Xojo Documentation at: <a href="https://documentation.xojo.com/api/user_interface/controls/chart.html#chart">https://documentation.xojo.com/api/user_interface/controls/chart.html#chart</a><br>You can learn more about the ChartDataset class (and subclasses) in the Xojo Documentation at: <a href="https://documentation.xojo.com/api/user_interface/charts/chartdataset.html#chartdataset">https://documentation.xojo.com/api/user_interface/charts/chartdataset.html#chartdataset</a></p>



<p>A big thank you for all of you providing feedback and suggestions about how to improve Charts on Xojo! All of these new additions are a direct response from request made from you, so we are happy to make it work the way you need to adhere even more to your needs!</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Xojo 2024r4 is Now Available!</title>
		<link>https://blog.xojo.com/2024/12/10/xojo-2024r4-is-now-available/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 16:36:12 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r4]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Code Editor]]></category>
		<category><![CDATA[Hardened Runtime]]></category>
		<category><![CDATA[Notarization]]></category>
		<category><![CDATA[Preemptive Threads]]></category>
		<category><![CDATA[Sandboxing]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14183</guid>

					<description><![CDATA[Xojo 2024 Release 4 introduces a suite of powerful new features and enhancements, along with numerous bug fixes, further solidifying Xojo’s commitment to providing a&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2024 Release 4 introduces a suite of powerful new features and enhancements, along with numerous bug fixes, further solidifying Xojo’s commitment to providing a robust and versatile development environment. With 33 new features added and 182 bugs fixed, Xojo 2024r4 is designed to enhance your productivity and expand your creative possibilities.</p>



<h2 class="wp-block-heading">What’s New in Xojo 2024r4</h2>



<p>Xojo 2024r4 brings a range of exciting updates that enhance cross-platform development, improve security, and provide more tools for creating dynamic and interactive applications. Here are some of the standout features:</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Android Localization</strong></p>



<p>Expand your app’s reach with comprehensive localization support for Android. Easily add translations and switch locales using the intuitive Constant Editor, allowing you to cater to a diverse, global audience without the hassle.</p>



<p><a href="https://blog.xojo.com/2024/12/10/android-localization/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/android-localization/" target="_blank" rel="noreferrer noopener">Learn more about Android Localization</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Extended Android Features</strong></p>



<p>We&#8217;ve enhanced Android support by integrating several standard Xojo language features, including Structures, ByRef parameters, Operator_Lookup, and Operator_Convert.</p>



<p><a href="https://blog.xojo.com/2024/12/10/android-language-features/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/android-language-features/" target="_blank" rel="noreferrer noopener">Discover the Extended Android Features</a></p>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Selection Matching</strong></p>



<p>Boost your coding efficiency with the new Selection Matching feature in Xojo&#8217;s Code Editor. Quickly highlight and track all occurrences of selected text in your code, making it easier to navigate, refactor, and maintain your projects.</p>



<p><a href="https://blog.xojo.com/2024/12/10/code-editor-selection-matching/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/code-editor-selection-matching/" target="_blank" rel="noreferrer noopener">Learn more about Code Selection Matching</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Secure Mac Apps</strong></p>



<p>Enhance the security of your Mac applications directly from the Xojo IDE with built-in support for Sandboxing, Hardened Runtime, and Notarization. These features ensure your apps meet the latest security standards, providing a safe and trusted experience for your users.</p>



<p><a href="https://blog.xojo.com/2024/12/10/sandboxing-hardened-runtime-and-notarization-arrives-to-the-xojo-ide/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/sandboxing-hardened-runtime-and-notarization-arrives-to-the-xojo-ide/" target="_blank" rel="noreferrer noopener">Learn more</a></p>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Enhanced Charts</strong></p>



<p>Take control of your data visualization with Enhanced Charts. Gain precise control over DataSets and legends, and design dynamic, interactive charts using new event handlers and properties. These improvements make it easier to create visually compelling and informative charts for your applications.</p>



<p><a href="https://blog.xojo.com/2024/12/10/more-control-over-your-charts/" target="_blank" rel="noreferrer noopener">Read about the enhanced Charts</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Preemptive Threads</strong></p>



<p>Experience faster execution, better debugging, and smarter object handling with the enhanced Preemptive Threads. This feature maximizes your application’s performance on multi-core systems, allowing for more responsive and efficient code.</p>



<p><a href="https://blog.xojo.com/2024/12/10/sharpening-our-preemptive-threads/" target="_blank" rel="noreferrer noopener">Understand Preemptive Threads</a></p>
</div>
</div>



<p><strong>Web Framework</strong><br>Enjoy smoother and more efficient web applications with updates to Xojo&#8217;s Web Framework. Improved memory usage and numerous bug fixes ensure that your web apps run reliably and perform optimally, providing a better experience for your users.</p>



<p><a href="https://blog.xojo.com/2024/12/10/xojo-web-improvements-in-2024r4/" target="_blank" rel="noreferrer noopener">Discover Web Framework Improvements</a></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>These updates and enhancements are designed to make your development process more efficient, productive, and enjoyable. Whether you’re building new applications or enhancing existing ones, Xojo 2024r4 provides the tools and capabilities you need to succeed.</p>



<h2 class="wp-block-heading">Get Started</h2>



<p>To learn more about Xojo 2024 Release 4 and begin your development journey, please visit the&nbsp;<a href="https://documentation.xojo.com/versions/2024r4/resources/release_notes/2024r4.html" target="_blank" rel="noreferrer noopener">Xojo 2024r4 Release Notes</a>. The update is available for download now from the&nbsp;<a href="https://xojo.com/download/" target="_blank" rel="noreferrer noopener">Xojo downloads page</a>.</p>



<h3 class="wp-block-heading">What’s Next?</h3>



<p>We’re continuously working on new features, updates, and enhancements to our platform. If you have any suggestions or ideas, please add them to the&nbsp;<a href="https://tracker.xojo.com/xojoinc/xojo">Xojo tracker</a>. We’re always looking to improve and expand Xojo to better serve our community.</p>



<p><strong>Thank you for being part of the Xojo community. We’re excited to see what you create with Xojo 2024r4!</strong></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>More fun with cha, cha, cha … charts!</title>
		<link>https://blog.xojo.com/2024/06/26/more-fun-with-cha-cha-cha-charts/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Wed, 26 Jun 2024 15:00:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r2]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[DarkMode]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13189</guid>

					<description><![CDATA[Xojo 2024r2 includes inline labels for Pie charts, more rendering options and full DarkMode support. You will also find fixes to a bunch of Chart related bugs.]]></description>
										<content:encoded><![CDATA[
<p>Based on user feedback, we added new functionality to the Chart control for Desktop, Web and iOS. Xojo 2024r2 includes inline labels for Pie charts, more rendering options and full DarkMode support. You will also find fixes to a bunch of Chart related bugs.</p>



<span id="more-13189"></span>



<h2 class="wp-block-heading">DarkMode</h2>



<p>All of the chart types now have the ability to render themselves properly in both light and dark modes. For that to happen, using different colors for data representation when the light or dark modes are enabled, all you need to do is assign ColorGroup instances instead of Color values when creating the DataChart instance.</p>



<p>For example, this snippet of code will create two data sets using ColorGroup instances for the values:</p>



<pre class="wp-block-code"><code>Var dsInflaction As New ChartLinearDataset("Dollar", New colorGroup(Color.red, Color.orange), True, dollar)
Var dsTemp As New ChartLinearDataset("Euro", New colorgroup(Color.blue, Color.white), True, euro)</code></pre>



<p>And this is how it is rendered in light and dark modes:</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="2991" height="1225" src="https://blog.xojo.com/wp-content/uploads/2024/06/ChartDarkMode.png" alt="" class="wp-image-13190" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/ChartDarkMode.png 2991w, https://blog.xojo.com/wp-content/uploads/2024/06/ChartDarkMode-300x123.png 300w, https://blog.xojo.com/wp-content/uploads/2024/06/ChartDarkMode-1024x419.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/06/ChartDarkMode-768x315.png 768w, https://blog.xojo.com/wp-content/uploads/2024/06/ChartDarkMode-1536x629.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/06/ChartDarkMode-2048x839.png 2048w" sizes="auto, (max-width: 2991px) 100vw, 2991px" /></figure>
</div>


<h2 class="wp-block-heading">More Grid Flexibility</h2>



<p>We added three new properties the the Chart control itself to better handle the way you want the chart grid to be rendered:</p>



<ul class="wp-block-list">
<li>IsGridVisible</li>



<li>IsYAxisVisible</li>



<li>IsXAxisVisible</li>
</ul>



<p>For example, in previous releases you needed to set the GridColor property to Color.Clear to avoid the drawing of the grid lines in the chart. Now, you can set the GridColor to any other color you (or your app user) may want, and simply control if the grid is rendered or not setting the IsGridVisible property to the True/False boolean value.</p>



<p>In addition to the grid itself, you have the flexibility to decide if the rendered chart will display the X or the Y axis along their values through the IsXAxisVisible and the IsYAxisVisible boolean properties. As with the IsGridVisible property, you can change these values at runtime and the chart will be updated accordingly:</p>



<figure class="wp-block-video"><video controls src="https://blog.xojo.com/wp-content/uploads/2024/06/GridXYVisible.mp4"></video></figure>



<h2 class="wp-block-heading">Inline Labels</h2>



<p>Also, starting with Xojo 2024r2, for all the chart representations based on a ChartCircularDataset, you will be able to decide if you want the Labels to be rendered inline in addition to these rendered by default in the upper section of the chart, or instead of these. This can get a better identification of the label representing every Pie chart section, requiring less screen space.</p>



<figure class="wp-block-video"><video controls src="https://blog.xojo.com/wp-content/uploads/2024/06/InlineLabels.mp4"></video></figure>



<p>In order to display the Inline labels all you need to do is set the ChartCircularDataset.HasInlineLabels property to True.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>As always, we look forward to keep improving Charts and see how do you use them in you Xojo developed apps and solutions!</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/06/GridXYVisible.mp4" length="379781" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/06/InlineLabels.mp4" length="132654" type="video/mp4" />

			</item>
		<item>
		<title>New Additions to DesktopChart, MobileChart and WebChart</title>
		<link>https://blog.xojo.com/2023/08/09/new-additions-to-desktopchart-mobilechart-and-webchart/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Wed, 09 Aug 2023 13:30:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11711</guid>

					<description><![CDATA[DesktopChart, MobileChart, and WebChart have received some new features and improvements based mostly on user feedback. New features include a new Stacked chart type, more customization options for the already supported chart types and improvements to the chart control itself. Continue reading to get the details about all these great new things in Xojo.]]></description>
										<content:encoded><![CDATA[
<p>DesktopChart, MobileChart, and WebChart have received some new features and improvements based mostly on user feedback. New features include a new Stacked chart type, more customization options for the already supported chart types and improvements to the chart control itself. Continue reading to get the details about all these great new things in Xojo.</p>



<span id="more-11711"></span>



<h3 class="wp-block-heading">Stacked Chart Type</h3>



<p>In addition to the already existing Line and Bar charts, you can now render Stacked charts using the same LinearChartDatasets objects set to Bar mode. It is also possible to switch between Bar and Stacked with the same data on the fly.</p>



<figure class="wp-block-video"><video controls src="https://blog.xojo.com/wp-content/uploads/2023/07/Stacked.mp4"></video></figure>



<h3 class="wp-block-heading">More Line Styles and Endings</h3>



<p>Originally, the bullet ending was the only available option for Line charts rendered since we first introduced WebChart back in 2020, and for DesktopChart and MobileChart introduced in Xojo 2023r1. Now there are more options to choose from, including &#8220;None&#8221;, in order to further customize the look of a Line chart as well as Scatter and Bubble charts.</p>



<figure class="wp-block-video"><video controls src="https://blog.xojo.com/wp-content/uploads/2023/07/LineEndings.mp4"></video></figure>



<p>It is also possible to set the line mode to solid or dashed for Line, Scatter and Bubble chart types. This means that, in Scatter and Bubble charts, you&#8217;ll be able to connect the rendered data dots to provide more meaning to your charts.</p>



<p>&#8220;None&#8221; is also now available as one of the style options for Line charts so you can render them with no connected end points. For example, the following snippet of code will create a new ChartLinearDataset with the line ending set to dross and the line type set to dashed:</p>



<pre id="Xojo" class="wp-block-preformatted"><code>Var data2() As Double

For i As Integer = 1 To 12
  data2.Add(System.Random.InRange(5, 40))
Next
Var myset As ChartLinearDataset = New ChartLinearDataset("Line Data", Color.Blue, True, data2)

myset.Style.EndPoint = ChartLinearStyle.EndPoints.Cross
mySet.Style.Line = ChartLinearStyle.LineTypes.Dashed
Me.AddDataset(myset)</code></pre>



<h3 class="wp-block-heading">More Customization Options</h3>



<p>In previous releases, the font name, font size and font color were common to the drawing of all the strings in the chart. Now you can set different attributes for Title, Legends and Axis in order to further customize the look of your charts. For example, in a single chart you can set one font and text color for the Title and an entirely different font and text color for Legend and Axis.</p>



<figure class="wp-block-image is-style-default"><img loading="lazy" decoding="async" width="1024" height="675" src="https://blog.xojo.com/wp-content/uploads/2023/07/TitleLegends-1024x675.png" alt="" class="wp-image-11715" srcset="https://blog.xojo.com/wp-content/uploads/2023/07/TitleLegends-1024x675.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/07/TitleLegends-300x198.png 300w, https://blog.xojo.com/wp-content/uploads/2023/07/TitleLegends-768x506.png 768w, https://blog.xojo.com/wp-content/uploads/2023/07/TitleLegends-1536x1012.png 1536w, https://blog.xojo.com/wp-content/uploads/2023/07/TitleLegends.png 1666w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Additionally, it is now possible to set prefix and suffix values to be used along the Y axis. It is also possible to use the Format property to format the Y axis values. The placeholders and syntax used in the expected Format string are the same you are familiar with in other areas of the Xojo framework when working with Strings.</p>



<p>Watch a related <a href="https://youtu.be/qcxfgFQjUx4">video</a> New Features and Improvements for Charts and visit the Xojo Documentation for more on <a href="https://documentation.xojo.com/api/user_interface/desktop/desktopchart.html#desktopchart">DesktopChart</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilechart.html#mobilechart">MobileChart</a>, and <a href="https://documentation.xojo.com/api/user_interface/web/webchart.html#webchart">WebChart</a>.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/07/Stacked.mp4" length="440381" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/07/LineEndings.mp4" length="566489" type="video/mp4" />

			</item>
		<item>
		<title>Updates for Web Projects in Xojo 2023r2</title>
		<link>https://blog.xojo.com/2023/08/09/updates-for-web-projects-in-xojo-2023r2/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Wed, 09 Aug 2023 13:30:00 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[DarkMode]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web SDK]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[WebListBox]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11671</guid>

					<description><![CDATA[Xojo 2023r2 comes with a lot of updates for Xojo Web. While Dark Mode and Bootstrap 5 are the main feature in this release, we've put a lot of effort into making everything better including: improved accessibility, updates to the WebListBox and WebChart and IDE performance improvements and more.]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2023r2 comes with a lot of updates for Xojo Web. While Dark Mode and Bootstrap 5 are the main feature in this release, we&#8217;ve put a lot of effort into making everything better including: improved accessibility, updates to the WebListBox and WebChart, IDE performance improvements and more.</p>



<span id="more-11671"></span>



<h3 class="wp-block-heading">Dark Mode Support and Bootstrap 5</h3>



<p>You can now create web applications with Xojo that respects users&#8217; Dark Mode preference with Bootstrap 5.</p>



<p>There is a new WebSession.ColorMode property you can use. It will be set as Auto by default, meaning it will match the user&#8217;s OS appearance preference, but it can also be forced to Light or Dark. It can be changed at runtime and per session.</p>



<p>While not everyone likes Dark Mode, some of your end users will appreciate this. Due to medical circumstances, they might actually need it, so please consider adding support even if you don&#8217;t like dark interfaces.</p>



<p>If you want to enable Dark Mode in your previous projects, you will have to manually enable the setting in the Shared Build Settings section (which is turned on by default on new projects):</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="786" src="https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting-1024x786.png" alt="" class="wp-image-11672" srcset="https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting-1024x786.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting-300x230.png 300w, https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting-768x589.png 768w, https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting.png 1114w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p><a href="https://documentation.xojo.com/api/graphics/colorgroup.html">Color Groups</a> can also be used nearly everywhere, and they will be used in the IDE preview when you toggle between Light and Dark Mode:</p>



<figure class="wp-block-video aligncenter"><video height="1680" style="aspect-ratio: 2786 / 1680;" width="2786" controls src="https://blog.xojo.com/wp-content/uploads/2023/07/ColorGroup-IDE-preview.mp4"></video></figure>



<p>In order get Dark Mode support ready for Web, we had to upgrade our internal <a rel="noreferrer noopener" href="https://getbootstrap.com" data-type="URL" data-id="https://getbootstrap.com" target="_blank">Bootstrap</a> dependency from v4.6.1 to v5.3.0, which is a huge leap by itself. Bootstrap 5 comes with a refreshed color palette, new components, modernized existing controls and bug fixes. Please check our previous <a href="https://blog.xojo.com/2023/01/26/bootstrap-5-is-coming-to-the-xojo-web-framework/" data-type="post" data-id="11198">Bootstrap 5 is Coming to the Xojo Web Framework</a> blog post.</p>



<p>If your application wasn&#8217;t using a custom Bootstrap Theme (bootstrap.min.css), everything should look more or less the same except for the subtle color palette differences and rounder buttons. Bootstrap 4 themes aren&#8217;t supported in Bootstrap 5, please replace it with a v5 theme if needed. Not every theme supports Dark Mode, but the one included in Xojo does.</p>



<p>If you are a theme builder, please check the <a rel="noreferrer noopener" href="https://getbootstrap.com/docs/5.3/customize/color-modes/" target="_blank">Bootstrap&#8217;s Color Modes documentation</a>. You can also find free Bootstrap 5 themes available at&nbsp;<a href="https://bootswatch.com" target="_blank" rel="noreferrer noopener">Bootswatch</a>.</p>



<p>We also want to send a big thank you to our third party developers for their effort adapting their Open Source and Commercial plugins and controls to Bootstrap 5. You can learn about what they offer at the Xojo <a href="https://www.xojo.com/store/#addons">Extras Store</a> and in the <a href="https://documentation.xojo.com/resources/third_party/open_source_projects.html">Open Source Projects</a> page in the Xojo Documentation.</p>



<h3 class="wp-block-heading">Accessibility</h3>



<p>Navigating and using web applications with the keyboard makes everyone&#8217;s life easier. In Xojo 2023r2 we&#8217;ve upgraded <a href="https://documentation.xojo.com/api/user_interface/web/webpagination.html#webpagination">WebPagination</a> and <a href="https://documentation.xojo.com/api/user_interface/web/webbreadcrumb.html#webbreadcrumb">WebBreadcrumb</a> controls, which are composed of more than one focusable item. Your users will be able to properly use the tab key to go through them.</p>



<figure class="wp-block-video aligncenter"><video height="998" style="aspect-ratio: 1404 / 998;" width="1404" controls src="https://blog.xojo.com/wp-content/uploads/2023/07/Tab-WebPagination-and-WebBreadcrumb.mp4"></video></figure>



<p>We plan to continue working on improving Accessibility. Please open a new <a href="https://tracker.xojo.com/xojoinc/xojo/-/issues/new" target="_blank" rel="noreferrer noopener">Issue</a> if you find anything that can help you and your end users.</p>



<h3 class="wp-block-heading">WebListBox</h3>



<p>DataTables, the internal dependency we use for bringing your tables to life, has been upgraded from v1.10.20 to v1.13.4. This recent version includes support for Bootstrap 5 and a few bug fixes that some users were facing in their web projects.</p>



<p>You can now disable your <a href="https://documentation.xojo.com/api/user_interface/web/weblistbox.html#weblistbox">WebListBox</a> by setting its Enabled property to False so your users won&#8217;t be able to interact with it. And also, if you were missing this feature that&#8217;s in the DesktopListBox, you can now add Variant tags to your columns, using the new WebListBox.ColumnTagAt.</p>



<p>Last but not least, this control comes with a visual Inline Editor, like in its Desktop counterpart:</p>



<figure class="wp-block-video aligncenter"><video height="1806" style="aspect-ratio: 2786 / 1806;" width="2786" controls src="https://blog.xojo.com/wp-content/uploads/2023/07/WebListBox-Inline-Edit.mp4"></video></figure>



<h3 class="wp-block-heading">WebChart</h3>



<p>Chart.js, the underlying library we use for <a href="https://documentation.xojo.com/api/user_interface/web/webchart.html#webchart">WebChart</a>, has been upgraded from v2.9.3 to v4.2.1. Again, we&#8217;ve done everything we could on our side so you don&#8217;t have to do anything.</p>



<p>The only exception is with the WebChart.OverrideOptions event. If you are currently using it, you&#8217;ll have to check the library documentation as the internal options JSON has changed.</p>



<p>You can expect the new DesktopChart features to be working on WebChart, like configuring how the lines look like (including the endpoints), background images or prefix and suffixes. Read <a href="https://blog.xojo.com/2023/07/19/2023r2-new-additions-to-desktopchart-mobilechart-and-webchart">New Additions to DesktopChart, MobileChart and WebChart</a> to learn more.</p>



<h3 class="wp-block-heading">Web SDK</h3>



<p>If you are using third party controls, you will notice some of them now have a custom icon in the IDE Library. But even more important, they will use less memory at runtime.</p>



<p>Are you developing Open Source or Commercial Web SDK controls? Remember there is a dedicated <a rel="noreferrer noopener" href="https://forum.xojo.com/c/sdks/web-sdk/23" target="_blank">Web SDK forum</a> where you can ask any questions you may have. </p>



<h3 class="wp-block-heading">IDE Performance and Improved CSS Support</h3>



<p>Bootstrap 5 makes use of the latest CSS features. We took the opportunity to rethink our CSS parser and improve its performance at the same time. As a result, the IDE preview looks even closer to what you see in the browser, and we render everything faster.</p>



<h3 class="wp-block-heading">Wrapping Up</h3>



<p>Over 50 bug fixes and features were included just for Xojo Web in Xojo 2023r2. Please find a full list in the <a href="https://documentation.xojo.com/resources/release_notes/2023r2.html">Release Notes</a>. read more about <a href="https://blog.xojo.com/2023/08/09/bootstrap-5-in-xojo-web-2023r2/">Bootstrap 5</a> and updates to <a href="https://blog.xojo.com/2023/08/09/new-additions-to-desktopchart-mobilechart-and-webchart/">WebChart</a> on the Xojo Programming Blog.  We are looking forward to hearing your thoughts and seeing what you&#8217;re building with Xojo! See you in the forum!</p>



<p><em>Ricardo has always been curious about how things work. Growing up surrounded by computers</em> he became interested in <em>web technologies in the dial-up connections era. Xojo has been his secret weapon and language of preference since 2018. When he’s not online, chances are he will be scuba diving … or crocheting amigurumis. Find Ricardo on Twitter <a href="https://web.archive.org/web/20220805000833/https://www.twitter.com/piradoiv" target="_blank" rel="noreferrer noopener">@piradoiv</a>.</em></p>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/07/ColorGroup-IDE-preview.mp4" length="646228" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/07/Tab-WebPagination-and-WebBreadcrumb.mp4" length="202785" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/07/WebListBox-Inline-Edit.mp4" length="737982" type="video/mp4" />

			</item>
		<item>
		<title>Graphic Charts for Xojo Desktop and Mobile</title>
		<link>https://blog.xojo.com/2023/03/28/graphic-charts-for-xojo-desktop-and-mobile/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Tue, 28 Mar 2023 11:00:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Graphing]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Xojo Code]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11320</guid>

					<description><![CDATA[Graphic Charts support is new in Xojo Desktop and Xojo Mobile (iOS) in Xojo 2023r1. Graphic Charts offer a similar look and behavior to what you find when using Xojo's WebChart control in web projects. Let's review all the things you can do with the new DesktopChart in your desktop projects, and new MobileChart in your iOS projects.]]></description>
										<content:encoded><![CDATA[
<p>Graphic chart support is new in Xojo Desktop and Xojo Mobile (iOS) in Xojo 2023r1. The new DesktopChart and MobileChart offer a similar look and behavior to what you find when using Xojo&#8217;s WebChart. Let&#8217;s review all the things you can do with the new DesktopChart and MobileChart in your Xojo projects.</p>



<span id="more-11320"></span>



<p>Just as with Xojo&#8217;s <a href="https://documentation.xojo.com/api/user_interface/web/webchart.html#webchart">WebChart</a>, <a href="https://documentation.xojo.com/api/user_interface/desktop/desktopchart.html">DesktopChart</a> and <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilechart.html">MobileChart</a> offer the following chart types: Line, Bar, Pie, Doughnut, PolarArea, Scatter, Bubble and Radar. You can access these charts using the Inspector Panel or via code through the Mode property. You can even change the Mode (or chart type) at runtime on Desktop and Mobile.</p>


<div class="wp-block-image size-large wp-image-11322 is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="641" src="https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeDesktop-1024x641.png" alt="" class="wp-image-11322" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeDesktop-1024x641.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeDesktop-300x188.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeDesktop-768x481.png 768w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeDesktop-1536x962.png 1536w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeDesktop.png 2032w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">DesktopChart Mode set in the Inspector Panel.</figcaption></figure>
</div>

<div class="wp-block-image size-large wp-image-11323 is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="832" src="https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeiOS-1024x832.png" alt="" class="wp-image-11323" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeiOS-1024x832.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeiOS-300x244.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeiOS-768x624.png 768w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeiOS-1536x1248.png 1536w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartModeiOS.png 1758w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">MobileChart Mode set in the Inspector Panel.</figcaption></figure>
</div>


<p>Line and Bar types are similar; both display sets of data that have been set to Line or Bar Modes. Display as many data sets as you need in your DesktopChart or MobileChart by setting the Mode to Line or Bar.&nbsp;The only difference is how these will be displayed along the x axis.</p>



<p>To better understand, let&#8217;s write some code in the Opening Event Handler of a DesktopChart control added to a Desktop project:</p>



<pre class="wp-block-code xojo"><code><code>Var labels() As String
Var firstSetOfData() As Double
Var secondSetOfData() As Double
Var thirdSetOfData() As Double

For n As Integer = 0 To 9
  labels.add "LB"+n.ToString
  firstSetOfData.add System.Random.InRange(0,1000)
  secondSetOfData.add System.Random.InRange(0,1000)
  thirdSetOfData.add System.Random.InRange(0,1000)
Next

Me.mode = DesktopChart.Modes.Line
Me.Title = "Chart Example With Two Datasets"
Me.AddLabels labels

Var DS1 As New ChartLinearDataset("DS1", Color.Blue, True, firstSetOfData)
DS1.ChartType = ChartLinearDataset.ChartTypes.Line

Var DS2 As New ChartLinearDataset("DS2", Color.Red, True, secondSetOfData)
DS2.ChartType = ChartLinearDataset.ChartTypes.Bar

Var DS3 As New ChartLinearDataset("DS2", Color.Green, True, thirdSetOfData)
DS3.ChartType = ChartLinearDataset.ChartTypes.Bar

Me.AddDatasets DS1, DS2, DS3</code></code></pre>



<p>This is how it will look when the Chart has been set to Line, displaying three data sets: one of which has been set to Line and the other two to Bar:</p>


<div class="wp-block-image size-large wp-image-11321 is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="777" src="https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToLine-1024x777.png" alt="" class="wp-image-11321" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToLine-1024x777.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToLine-300x228.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToLine-768x582.png 768w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToLine.png 1424w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Chart instance set to Line Mode.</figcaption></figure>
</div>


<p>As you can see, when the ChartType is Line, the data sets that are set to Line start drawing at the origin of the X axis, where the labels are also drawn for each column of data. This also happens when drawing data sets whose ChartType is set to Bar; thus, the first bar on the first column has half the width.</p>



<p>Below shows the same data sets but the ChartType is Bar. Now the Bar data sets overlay the position for the labels drawn along the X axis (they are centered on each column), and also have full the width. However, because of that, the data set whose ChartType is set to Line starts drawing at half the width of the column.</p>


<div class="wp-block-image wp-image-11324 size-large is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="777" src="https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToBar-1024x777.png" alt="" class="wp-image-11324" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToBar-1024x777.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToBar-300x228.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToBar-768x582.png 768w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartSetToBar.png 1424w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Chart instance set to Bar Mode.</figcaption></figure>
</div>


<p>You can add as many new data sets as you want, remove them, update their values, color, etc. The chart will update to reflect the changes, including the minimum and maximum values displayed in the Y axis. Keep in mind, if a chart&#8217;s Mode has been set to Line or Bar it will only display data sets created as ChartLinearDataset (by default they are set to the Line ChartType). WebChart will behave the same, starting with Xojo 2023r1.</p>



<p>One difference to note when using ChartLinearDataset is that you can set the Transparency property ranging from 0 (fully opaque) to 100 (fully transparent), as well as the CornerSize when the ChartLinearDataset ChartType is set to Bar.</p>



<h3 class="wp-block-heading">ChartDataset and Chart Modes</h3>



<p>I already showed you that a chart set to Line or Bar only displays data sets created from the ChartLinearDataset class. A similar rule applies when the chart is set to other Modes. For example, Pie, Doughnut, PolarArea or Radar charts only display data sets created from the ChartCircularDataset class.</p>



<figure class="wp-block-image is-style-default"><img loading="lazy" decoding="async" width="1024" height="232" src="https://blog.xojo.com/wp-content/uploads/2023/02/CircularDataset-1024x232.png" alt="" class="wp-image-11325" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/CircularDataset-1024x232.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/02/CircularDataset-300x68.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/CircularDataset-768x174.png 768w, https://blog.xojo.com/wp-content/uploads/2023/02/CircularDataset-1536x349.png 1536w, https://blog.xojo.com/wp-content/uploads/2023/02/CircularDataset-2048x465.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ul class="wp-block-list">
<li>In the same vein, Scatter and Bubble charts only display data sets created from the ChartScatteredDataset class.</li>
</ul>


<div class="wp-block-image is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="300" height="277" src="https://blog.xojo.com/wp-content/uploads/2023/02/Scatter-Bubble-300x277.png" alt="" class="wp-image-11326" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/Scatter-Bubble-300x277.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/Scatter-Bubble-1024x945.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/02/Scatter-Bubble-768x709.png 768w, https://blog.xojo.com/wp-content/uploads/2023/02/Scatter-Bubble.png 1330w" sizes="auto, (max-width: 300px) 100vw, 300px" /></figure>
</div>


<h3 class="wp-block-heading">DesktopChart and MobileChart, additional Properties</h3>



<p>DesktopChart and MobileChart offer additional customisation properties. For example, you can set the font, font size and font color for the title, legend, labels and values on the Y axis.</p>



<p>When setting the maximum font size used for the drawing of the Y axis values based on the chart control instance size (height), if the height of the control is not enough to display the values at the specified font size, it automatically adjusts.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="484" src="https://blog.xojo.com/wp-content/uploads/2023/02/ChartFontSize-1024x484.png" alt="" class="wp-image-11327" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/ChartFontSize-1024x484.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartFontSize-300x142.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartFontSize-768x363.png 768w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartFontSize-1536x727.png 1536w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartFontSize-2048x969.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>Other properties to further customize the look of the chart include BackgroundColor and GridColor.</p>



<p><em>Tip: You may want to set the color to Color.Clear if you want your charts to be drawn or &#8220;visible&#8221;, like if you plan to layout the chart control on top of other UI controls.</em></p>



<p>In addition, you can control whether or not to display that popup that shows the underlying value as the user moves the cursor (or while dragging their finger, on iOS). This is done through the AllowPopover property (True, by default).</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="840" height="392" src="https://blog.xojo.com/wp-content/uploads/2023/02/ChartPopoverCustom.png" alt="" class="wp-image-11328" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/ChartPopoverCustom.png 840w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartPopoverCustom-300x140.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartPopoverCustom-768x358.png 768w" sizes="auto, (max-width: 840px) 100vw, 840px" /></figure>
</div>


<p>Set the background and text color in the Popover using the PopoverBackgroundColor and PopoverTextColor properties. These expect a ColorGroup instance, so they can adjust when the control is in Light or Dark Mode.</p>



<h3 class="wp-block-heading">Getting informed</h3>



<p>As you may expect from their WebChart counterpart, DesktopChart and MobileChart offer a Pressed event handler to receive the index and dataset instance over which the user clicked/tapped.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="206" src="https://blog.xojo.com/wp-content/uploads/2023/02/ChartPressed-1024x206.png" alt="" class="wp-image-11329" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/ChartPressed-1024x206.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartPressed-300x60.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartPressed-768x154.png 768w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartPressed.png 1194w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>Because the chart control can handle different ChartDatasets you&#8217;ll probably want to cast the received ChartDataset instance received in the Pressed handler to the right one before proceeding with any actions that are not common to all kind of ChartDatasets.</p>



<h3 class="wp-block-heading">Draw it!</h3>



<p>You can call the DrawInto method on a chart, provide the expected graphic context and also the left and top values to proceed with the drawing. For example, this is what a DesktopChart looks like when drawn on a Picture of the same size:</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="560" height="322" src="https://blog.xojo.com/wp-content/uploads/2023/02/ToPicture.png" alt="" class="wp-image-11330" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/ToPicture.png 560w, https://blog.xojo.com/wp-content/uploads/2023/02/ToPicture-300x173.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /></figure>
</div>


<p>It is also possible to render the chart to PDF in a vectorial way using the AddChart method on a PDFDocument instance. The parameters this method expects are the chart instance itself, the X and Y values (where it will be placed in the current PDF page), and the width and height values for the rendering.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="573" src="https://blog.xojo.com/wp-content/uploads/2023/02/ChartToPDF-1024x573.png" alt="" class="wp-image-11331" srcset="https://blog.xojo.com/wp-content/uploads/2023/02/ChartToPDF-1024x573.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartToPDF-300x168.png 300w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartToPDF-768x429.png 768w, https://blog.xojo.com/wp-content/uploads/2023/02/ChartToPDF.png 1452w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>For example, this code will create a PDF file in the Desktop with the same height value of the chart instance, with the width set to the width of the page, minus the margins:</p>



<pre class="wp-block-code xojo"><code><code>Var d As New PDFDocument</code>
<code><span style="font-family: inherit; font-size: inherit;">Var g As Graphics = d.Graphics</span>
d.AddChart(chart1, 20, 20, g.Width-40, chart1.Height )
d.Save(SpecialFolder.Desktop.Child("ChartPDF.PDF"))</code></code></pre>



<h3 class="wp-block-heading">In summary</h3>



<p>As you can see, now it is possible to add Graphical Charts to your Desktop and iOS projects with the same ease and in the same way it is already possible on web projects, plus some more customization options. Watch a <a href="https://youtu.be/zO_UNDlERwE">quick video</a> on this topic. No license is required to learn, develop and test your projects in the latest Xojo release! <a href="https://xojo.com/download/">Download Xojo</a> 2023r1 today!</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Heatmaps with the Monkeybread ChartDirector Plugin</title>
		<link>https://blog.xojo.com/2021/07/13/heatmaps-with-monkeybread-chartdirector-plugin/</link>
		
		<dc:creator><![CDATA[Stefanie Juchmes]]></dc:creator>
		<pubDate>Tue, 13 Jul 2021 15:00:00 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[XDC]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Monkeybread Software]]></category>
		<category><![CDATA[OmegaBundle]]></category>
		<category><![CDATA[Third Party]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=8804</guid>

					<description><![CDATA[In this blog post I want to show you how to build a heatmap as a representative for other diagrams. In order to complete this project you'll the MBS Xojo ChartDirector Plugin, conveniently included in the Omegabundle. A heat map is a grid of fields...]]></description>
										<content:encoded><![CDATA[
<p>In this blog post I want to show you how to build a heatmap. In order to complete this project you&#8217;ll need the <a href="https://www.xojo.com/store/addons/MBS.php">MBS Xojo ChartDirector Plugin</a>, conveniently included in the <a href="http://omegabundle.net/">Omegabundle</a> right now.</p>



<p>A heatmap is a grid of fields that can have different sizes and colors. Heatmaps are often used to analyze website user behavior. Each area is assigned a color, and heat maps let you see the high and the low of that area. They often look like the image of a thermal camera, which is where the name comes from. Of course, a heatmap can also be used for displaying different temperatures, as its name so aptly describes. In this example we want to do that. We have the monthly mean temperature for a city for the last 10 years and we want to display this temperature by colors in a heatmap. </p>



<h2 class="wp-block-heading">The Data</h2>



<p>To do this, we first create an array in which we write the years we have and an array with the individual month names: The information in these arrays will be needed later for the labelling of the axes. </p>



<p>In order to be able to display values in a diagram, we want to write the values into a single array with all the months following with their values. We will combine the values as follow:&nbsp;</p>



<pre class="wp-block-preformatted">Array( Jan ( 0 ) … Jan ( 9 ) , Feb ( 0 ) … Feb ( 9 ) , Mar ( 0 ) … , … Dec ( 9 ) )</pre>



<p>We start with the January values and append the other months behind it. We can highlight special parts of the heatmap by adding a star, a polygon or a cross of any color to the area.&nbsp;</p>



<h2 class="wp-block-heading">Creating the Heatmap</h2>



<p>Now we come to the creation of the actual diagram. We create an area 600 x 500 pixels in size; on this area we will later draw our chart and the legend. To do this, we create an instance of the class&nbsp;<a href="https://www.monkeybreadsoftware.net/class-cdxychartmbs.shtml">CDXYChartMBS</a>&nbsp;and pass the size in the parameters.&nbsp;</p>



<pre class="wp-block-preformatted">Dim c As New CDXYChartMBS(600, 500)</pre>



<p>Above the chart, with addTitle, we can add a title that describes our chart. Our chart should be on an area of 400 x 400 pixels and have a distance of 80 pixels from the top edge. The background color, as well as the grid color is transparent.&nbsp;</p>



<pre class="wp-block-preformatted">Dim p As CDPlotAreaMBS = c.setPlotArea(80, 80, 400, 400, -1, -1, CDBaseChartMBS.kTransparent, CDBaseChartMBS.kTransparent)</pre>



<p>Now our symbol for minimum temperature is added. The minimum temperature is a small circle in a light blue color. In the addScatterLayer method we first specify the X and Y coordinate arrays as parameters then the title that will later be displayed in the legend next to the diagram and the shape of the symbol. Here we use PolygonShape. The number in the brackets behind the shape indicates the number of sides of the polygon. If this is 0, we see a circle. Then in the parameters follows the size of the symbol and the color. The structure is the same for other marks.</p>



<pre class="wp-block-preformatted">Call c.addScatterLayer(symbolX, symbolY, "Min value", CDBaseChartMBS.PolygonShape(0), 15, &amp;hc6e2ff)</pre>



<p>Now we create the heatmap with the method addDiscreteHeatMapLayer. It should have a size of 10 x 12 cells. 10 cells on the x axis and 12 cells on the y axis. In the parameters we first specify the array with the data and then the amount of cells on the x axis. For this we have to determined the array size of the array of the years. The cell amount for y axis is automatically determined from the amount of data. </p>



<pre class="wp-block-preformatted">Dim layer As CDDiscreteHeatMapLayerMBS = c.addDiscreteHeatMapLayer(zData, xLabels_size)</pre>



<p>We now set the labels for the axes. With the method setLabels we specify the text. With the method xAxis.setLabelStyle we specify the font and the font color. The label should be rotated by 90 degrees on the x axis so that it is easier to read. With setLabelOffset we set the distance of the text to the grid border. With a value of 0, the text would be on the left or upper edges of the cell and not in the middle. With setXAxisOnTop we indicate that the text of the x axis should be above the diagram. </p>



<p>The setting of the y axis labels is similar</p>



<pre class="wp-block-preformatted">Call c.xAxis.setLabels(xLabels) 
Call c.xAxis.setLabelStyle("Arial Bold", 10, CDBaseChartMBS.kTextColor, 90) c.xAxis.setColors(CDBaseChartMBS.kTransparent, CDBaseChartMBS.kTextColor) 
c.xAxis.setLabelOffset(0.25) 
c.setXAxisOnTop 

Call c.yAxis.setLabels(yLabels) 
Call c.yAxis.setLabelStyle("Arial Bold", 10) c.yAxis.setColors(CDBaseChartMBS.kTransparent, CDBaseChartMBS.kTextColor) 
c.yAxis.setLabelOffset(0.25) 
c.yAxis.setReverse</pre>



<p>Now we want to specify the individual colors for the value ranges. For this we create a new array. In this array we first enter the lower limit of the temperature that the color should describe, then the color value in hexadecimal followed by the uppermost value. The uppermost value is at the same time the lowermost value of the next color, so we don&#8217;t enter it twice, but give directly the next color. Our values all have a distance of 3 degrees. Afterwards we create the array colorLabels, which describes the text for our legend</p>



<pre class="wp-block-preformatted">Dim colorScale() As Double = Array(0.0, &amp;h104E8B, 0.0, &amp;h00BFFF, 3.0, &amp;h7FFFD4, 6.0, &amp;hFFFF00, 9.0, &amp;hFFC125, 12.00, &amp;hFF7F00, 15.00, &amp;hff4500, 18.00, &amp;hcd0000, 21.00,&amp;h8B0000, 21.10) 
Dim colorLabels() As String = Array("&lt;0.0", "0.0-3.0", "3.1-6.0", "6.1-9.0", "9.1-12.0", "12.1-15.0", "15.1-18.0", "18.1-21.0", „>21.0“)</pre>



<p>We then apply the colors with colorAxis.setColorScale on the layer level.</p>



<pre class="wp-block-preformatted">layer.colorAxis.setColorScale(colorScale)</pre>



<p>We place the legend 20 pixels to the right of the diagram. We use the font Arial Bold in size 10. With setKeySize we set the size of the legend boxes and with setKeySpacing the vertical distance between the individual legend entries.</p>



<pre class="wp-block-preformatted">Dim b As CDLegendBoxMBS = c.addLegend(p.getRightX + 20, p.getTopY, True, "Arial Bold", 10) 
b.setBackground(CDBaseChartMBS.kTransparent, CDBaseChartMBS.kTransparent) 
b.setKeySize(15, 15) 
b.setKeySpacing(0, 8) 
b.addText("Temp in °C“)</pre>



<p>For the colors we use a trick, we read only the colors from the array that contains the color values and the temperature ranges by looking only at every second value. With the method addKey we then add the tag with the name and the extracted color.&nbsp;</p>



<pre class="wp-block-preformatted">For i As Integer = colorLabels_size - 1 DownTo 0 
 Dim n As Integer = colorScale(i * 2 + 1) 
 b.addKey(colorLabels(i), n) 
Next</pre>



<p>With the method makeChartPicture we get our diagram as picture:</p>



<pre class="wp-block-preformatted">pic = c.makeChartPicture</pre>



<p>And you can show this picture as backdrop to better draw it with the paint event. If you use MakeChart with PDF type as parameter, you can get a PDF file to embed in a PDF page as vector graphics.</p>



<p>Then we can run the program and see our heatmap. You can then continue to work with this heatmap according to your own preferences. The final heat map looks like this:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="758" src="https://blog.xojo.com/wp-content/uploads/2021/07/tempheatmap-1024x758.jpg" alt="" class="wp-image-8808" srcset="https://blog.xojo.com/wp-content/uploads/2021/07/tempheatmap-1024x758.jpg 1024w, https://blog.xojo.com/wp-content/uploads/2021/07/tempheatmap-300x222.jpg 300w, https://blog.xojo.com/wp-content/uploads/2021/07/tempheatmap-768x568.jpg 768w, https://blog.xojo.com/wp-content/uploads/2021/07/tempheatmap-1536x1136.jpg 1536w, https://blog.xojo.com/wp-content/uploads/2021/07/tempheatmap.jpg 1668w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>As I mentioned at the beginning of this post, you&#8217;ll need the <a href="https://www.monkeybreadsoftware.de/xojo/plugin-chartdirector.shtml">MBS Xojo ChartDirector Plugin</a> which you can purchase on the MonkeyBread Software website; or, at the moment, it&#8217;s included in super the <a href="http://omegabundle.net/">Omegabundle</a> deal. Besides ChartDirector, Omegabundle includes a ton of other tools for the sensational price of 399.99$. For example, you also get a DynaPDF Starter license with which you can use to write the chart into a PDF file. If you want to attend the Xojo Developer Conference 2022 in London and meet us, Omegabundle includes a discount of 100$ for the conference! Read articles from the Xdev developer magazine on the way to the conference, because it&#8217;s also included in the bundle! Have a look at the <a href="http://omegabundle.net/">Omegabundle</a>. It&#8217;s worth it. I hope you enjoy the heatmap!</p>



<p><em>Stefanie Juchmes studies computer science at the University of Bonn. She came in touch with Xojo due to the work of her brother-in-law and got a junior developer position in early 2019 at <a rel="noreferrer noopener" href="https://www.monkeybreadsoftware.de/xojo/" target="_blank">Monkeybread Software.</a> You may have also read her articles in <a rel="noreferrer noopener" href="http://www.xdevmag.com/" target="_blank">Xojo Developer Magazine</a>. </em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WebChart, Easy as Pie</title>
		<link>https://blog.xojo.com/2020/09/11/web-2-0-webchart-easy-as-pie/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Fri, 11 Sep 2020 15:00:00 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Graphing]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Xojo Code]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=7473</guid>

					<description><![CDATA[Learn to use the new WebChart class in Xojo's Web 2.0. Based on Chart.js, this class offers eight chart types you can create and use including the Line, Bar, Pie or Doughnut chart types.]]></description>
										<content:encoded><![CDATA[<p>Among the many new features introduced by the <a href="https://blog.xojo.com/2020/08/27/converting-web-projects-to-web-framework-2-0/"><strong>Web Framework 2.0</strong></a>, one of my favourites is the new <strong>WebChart</strong> class. Based on <a href="https://www.chartjs.org">Chart.js</a>, this class offers a total of eight chart types you can create and use really easily in your projects; including the Line, Bar, Pie or Doughnut chart types among others.<span id="more-7473"></span></p>
<p>The best thing is that implementing this feature in your Xojo Web projects is really easy to do, and extremely flexible to set-up! Just drag and drop the <a href="https://documentation.xojo.com/api/user_interface/web/webchart.html">WebChart</a> control from the Library to your page (or <a href="https://documentation.xojo.com/api/user_interface/web/webcontainer.html"><strong>ContainerControl</strong></a>) layout, set the Mode (type) of the chart you want to use and other properties in the Inspector Panel and you&#8217;re almost done.</p>
<figure id="attachment_7476" aria-describedby="caption-attachment-7476" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-7476" src="https://blog.xojo.com/wp-content/uploads/2020/09/WebChartInAction.gif" alt="" width="500" height="345"><figcaption id="caption-attachment-7476" class="wp-caption-text">WebChart in Action</figcaption></figure>
<p>Then, add your&nbsp;<a href="https://documentation.xojo.com/api/user_interface/web/webchart.htmlDataset"><strong>DataSet</strong></a> instances for your chart to display. Every one of these DataSets just needs to receive the Label to use, the data to display and the colors associated with each value or datapoint. For example, the following snippet of code creates a new <a href="https://documentation.xojo.com/api/user_interface/web/webchart.htmlCircularDataset">WebChartCircularDataSet</a> (<a href="https://documentation.xojo.com/api/user_interface/web/webchart.htmlLinearDataset">WebChartLinearDataset</a> and <a href="https://documentation.xojo.com/api/user_interface/web/webchart.htmlScatterDataset">WebChartScatterDataset</a> are other DataSet classes available, each of these use their own set of parameters in the Constructor):</p>
<pre>Var sales() As Double = Array(12500.0, 30200, 25600, 15800)
Var colors() As Color = Array(Color.Orange, Color.Brown, Color.Purple, Color.DarkGray)
Var ds As New WebChartCircularDataset("Test", sales, Colors)</pre>
<p>Every DataSet can be configured so it can fill or not fill the graphical object in the chart representing the value, and also associate another object with it via the usual <code>Tag</code> property.</p>
<p>Once we have a DataSet in place, we can add it to the chart simply calling the AddDataSet method on the WebChart instance. You can also add it to a specific position index or even remove a DataSet from the currently available ones in the WebChart instance. In this case <code>T</code> is the variable pointing to a WebChart:</p>
<pre>T.AddDataset(ds)</pre>
<p>Of course it is also possible to add labels to the WebChart itself. For example, if our DataSet has a total of four values, then we probably would want to add the same amount of labels to the chart instance:</p>
<pre>T.AddLabels("Q1", "Q2", "Q3", "Q4")</pre>
<p>In addition, one visually appealing thing is that the WebChart instance will animate the presentation of the dataset values; something it will do again every time we add a new DataSet to it. It is also possible to disable this behavior for the WebChart both via code and using the Inspector Panel.</p>
<p>Of course, you can add new DataSets to the WebChart once it is already shown in the webpage if you need to. But what you can&#8217;t do at runtime is changing the Mode (or type) of the WebChart itself. That is, if you did set a WebChart instance with the Mode set to Line, then you can&#8217;t change the mode via code to Bar.</p>
<p>All in all, I really think this is one of the (many) exceptional features introduced with Web 2.0 that will make your web apps shine even more and without much effort! Definitively, the icing on the Pie.</p>


<p>Questions? Ask me about Xojo programming on Twitter <a href="https://twitter.com/xojoes">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary">Xojo Forum</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Professional Charts in Xojo with ChartDirector</title>
		<link>https://blog.xojo.com/2020/07/27/professional-charts-in-xojo-with-chartdirector/</link>
		
		<dc:creator><![CDATA[Stefanie Juchmes]]></dc:creator>
		<pubDate>Mon, 27 Jul 2020 18:33:55 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Monkeybread Software]]></category>
		<category><![CDATA[Third Party]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=7193</guid>

					<description><![CDATA[Do you want to work with chart in your Xojo application? You can use the MBS ChartDirector Plugin in conjunction with the ChartDirector library to display charts.]]></description>
										<content:encoded><![CDATA[
<p>Do you want to work with chart in your Xojo application? You can use the <a href="https://www.monkeybreadsoftware.de/xojo/plugin-chartdirector.shtml">MBS ChartDirector Plugin</a> in conjunction with the ChartDirector library to display charts. In this article I would like to show you some examples that demonstrate some possibilities you have to create charts.</p>



<p>In this example we create a pie chart. A pie chart has one-dimensional data, that means that we need to filled <strong>one</strong> array with data. Here is our example:&nbsp;</p>



<p>Imagine a bakery making $1,500 a day. We now want to read from our chart what percentage of the profit is made by bread, buns, cakes and cookies. For this we enter in our array the 600$ of bread, 335$ of buns, 309$ of cake and 256$ of cookies.&nbsp;</p>



<p>So our array definition looks like this:&nbsp;</p>



<p><em>Dim data(-1) As Double = Array (600, 335, 309, 256)</em></p>



<p>We don&#8217;t have to worry about the percentage, because it is automatically calculated based on the specified array.&nbsp;</p>



<p>Now we create another array with the corresponding labels. It must be ensured that the label sequence corresponds to the order of the data sequence.&nbsp;</p>



<p><em>Dim labels(-1) As String = Array (&#8220;Bread&#8221;, &#8220;Buns&#8221;, &#8220;Cake&#8221;, &#8220;Cookies&#8221;)</em></p>



<p>We also arrange the colors of the individual circle sections as an array. Here is a small tip: You can use already known color combinations, lists of color combinations that harmonize well with each other can be found in the Internet in large numbers.&nbsp;</p>



<p>I have chosen a combination of pink and purple tones:&nbsp;</p>



<p><em>Dim colors(-1) As Integer<br>
colors.Append &amp;hBB397A <br>
colors.Append &amp;h7B448D <br>
colors.Append &amp;hDE69A5<br>
colors.Append &amp;h9672c6</em></p>



<p>Then we create our diagram working environment.&nbsp;</p>



<p><em>Dim c As New CDPieChartMBS(600, 400, &amp;hffffff, &amp;hffffff, 0)</em></p>



<p>In the parameters we can set the height and width of the working environment, the background color, the edge color and the stars of the elevation effect.&nbsp;</p>



<p>In the image you can see a working environment with a red background, blue edge color and the elevation of 5, additionally the corners have been rounded with the method <em>setRoundedFrame</em>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="768" src="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-1-1024x768.png" alt="" class="wp-image-7194" srcset="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-1-1024x768.png 1024w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-1-300x225.png 300w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-1-768x576.png 768w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-1.png 1424w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>But for our example we take a white background.</p>



<p>Then we can insert the title of the diagram that should appear in the middle of the upper side. In the parameters we can set the text, font, font size, font color, font box background color and the text box border color. In our example we define only the text and leave the remaining parameters at the default values.</p>



<p><em>call c.addTitle(&#8220;Pie Chart Demonstration&#8221;)&nbsp;</em></p>



<p>Now we can make some settings for the chart.</p>



<p>First we define the size and position of the pie chart.&nbsp;</p>



<p><em>c.setPieSize(300, 200, 110)</em></p>



<p>Our working area has a size of 600&#215;400 which means that if we want to position the chart in the middle of our working area we have to halve these values so we get 300 and 200 which we then specify in the parameters. The third parameter describes the size of the pie chart with the radius. If we had a ring chart instead of a pie chart, the inner radius would be given in a fourth parameter and the called function would be <em>setDonutSize</em>.&nbsp;</p>



<p>Afterwards we can specify the color of the data areas.&nbsp;</p>



<p>In the first parameter we specify that we want to set the data color, because the <em>SetColors</em> method can be used in many more areas. In the second parameter we specify the already created array <em>colors </em>:</p>



<p><em>c.setColors(c.kDataColor, colors)</em></p>



<p>Then we can set that our pie chart should be shown as a 3D figure and with the command:&nbsp;</p>



<p><em>c.set3D(deeps, 45, False) </em></p>



<p>Set the heights of the segments so that they look like stairs and the angle with which we look at the chart. The point of view depends on the shadow mode, which is switch off by default.&nbsp;</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="729" src="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-2-1024x729.png" alt="" class="wp-image-7195" srcset="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-2-1024x729.png 1024w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-2-300x214.png 300w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-2-768x547.png 768w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-2-1536x1093.png 1536w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-2-2048x1458.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="729" src="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-3-1024x729.png" alt="" class="wp-image-7196" srcset="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-3-1024x729.png 1024w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-3-300x214.png 300w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-3-768x547.png 768w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-3-1536x1093.png 1536w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-3-2048x1458.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>With Shadow Mode (2) and without Shadow Mode (3)</p>



<p>We prefer that the angle of the first segment does not start straight up, for this we use the <em>SetStartAngle</em> method. Also, the individual segments should not stick to each other and there should be a small gap between them. We want to highlight the largest segment a bit more and move it further out. In the <em>SetExplode</em> method we first specify the data segment we want to push out of the circle and the amount by which it should be pushed out:</p>



<p><em>c.setStartAngle(-20)<br>c.setExplode(0, 20)<br>c.setExplode(1, 20)<br>c.setExplode(2, 2)<br>c.setExplode(3, 2)</em></p>



<p>So that our data can also be displayed we have to pass the data to the diagram. With <em>SetData</em> we specify the data and assign the right labels to them. Both informations we find in the already prepared arrays:</p>



<p><em>c.setData(data, labels)</em></p>



<p>Our labels do not look handsome yet. We would like to change that now by defining their style. The label name should be italic, bold and a little bit bigger, than the other labels. Underneath it should be the given value in US$ and in brackets behind it the percentage value</p>



<p>The definition of this style is as given here in a format string:</p>



<p><em>c.setLabelFormat(&#8220;&lt;*block,halign=left*&gt;&lt;*font=timesbi.ttf,size=12,underline=0*&gt;{label}&lt;*/font*&gt;&lt;*br*&gt;US$ {value} ({percent}%)&#8221;)&nbsp;</em></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="729" src="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-4-1024x729.png" alt="" class="wp-image-7197" srcset="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-4-1024x729.png 1024w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-4-300x214.png 300w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-4-768x547.png 768w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-4-1536x1093.png 1536w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-4-2048x1458.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>In the style sting we first define the text alignment. This should be left-aligned. Then we specify timerbi.ttf as font. This font is already italics and bold (recognizable by the b and i at the end). In addition, we specify the font size with 12 and that the text is not underlined. These specifications refer to the label text. This is specified with <em>{label}</em> in the style string. After a line break the text <em>US$</em> and the value of the segment that is specified with <em>{value} </em>is following. In the default case it is assumed that the value is a number. But if it is a date we can format it with the following additions: <em>{value|mm/dd/yyyyy}</em>, <em>{value|mm/yyyyy}</em> or <em>{value|yyyyy}</em>. In our example, the percentage with <em>{percent}</em> in brackets follows.</p>



<p>If you want your segment description texts to be highlighted in the individual segment colors and have lines to the individual segments, you can add the following line:</p>



<p><em>c.setLabelLayout(c.kSideLayout)</em></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="729" src="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-5-1024x729.png" alt="" class="wp-image-7198" srcset="https://blog.xojo.com/wp-content/uploads/2020/07/Picture-5-1024x729.png 1024w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-5-300x214.png 300w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-5-768x547.png 768w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-5-1536x1093.png 1536w, https://blog.xojo.com/wp-content/uploads/2020/07/Picture-5-2048x1458.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Finally, we want to display our diagram in the window as a background picture. To do this, we adjust our window size to the size of the diagram. Then we create a picture with the method makeChartPicture, which we then set as the backdrop.&nbsp;</p>



<p><em>w.Height = c.getHeight<br>w.Width = c.getWidth<br>w.Backdrop = c.makeChartPicture</em></p>



<p>Of course we could have used the picture also to write it into a file. For this we can use the method <em>Save</em> in combination with a folder item or we could have used the picture to insert it into a PDF file with <a href="https://www.monkeybreadsoftware.de/xojo/plugin-dynapdf.shtml">DynaPDF</a>.&nbsp;</p>



<p>There are many more possibilities to design charts with Chart Director, but this example should give you a short insight to the work with Chart Director.&nbsp;</p>



<p>To use these functionalities you need a license of the <a href="https://www.monkeybreadsoftware.de/xojo/plugin-chartdirector.shtml">MBS ChartDirector Plugin</a>. You get it either in the Xojo store, on our website or currently in the <a href="http://www.omegabundle.net">OmegaBundle 2020</a>.</p>



<p>I wish you a lot of fun with the charts in Xojo.&nbsp;Download the project.</p>



<p><em>Stefanie Juchmes studies computer science at the University of Bonn. She came in touch with Xojo due to the work of her brother-in-law and got a junior developer position in early 2019 at<a rel="noreferrer noopener" href="https://www.monkeybreadsoftware.de/xojo/" target="_blank">&nbsp;Monkeybread Software.</a>&nbsp;You may have also read her articles in<a rel="noreferrer noopener" href="http://www.xdevmag.com/" target="_blank">&nbsp;Xojo Developer Magazine</a>.&nbsp;</em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
