Jump to content

BoltBait's Charts and Graphs Plugin v0.2 Updated Jun 22 2019


Recommended Posts

BoltBait's Charts and Graphs Plugin v0.2 (Prerelease, Test Build)

 

I quickly slapped this together because of this request.  (There are probably issues.  Give me feedback and I'll see if I can fix them.)

 

It looks like this:

 

ChartUI.png

 

You'll find it in the Effects > Render > Chart menu.

 

Instructions:

 

First, choose your chart type.  Then, click the "Enter Data" button to enter your chart data.  On the data entry screen, you can click the colors to change them and you can right-click on column titles to change those.  Finally, tinker with your other options and click the OK button to finalize your chart image.

 

Important:  Remember to click the "Save Data" button to save a copy of your chart data to an xml file.  This file can then be used later when clicking the "Load Data" button to restore your chart options and data.  This is the only way to save the format of your chart if you wish to come back later to make tweaks.  Once you click OK, your chart is now a graphic and can't be edited.

 

 

Limitations:

 

This chart control is not designed to work with selections.  I might add that later if users think it is important.  The resulting chart is scaled to the size of your canvas.  So, before running, set your canvas size to the size of graph you want and press Ctrl+D to close any selection you might have active.

 

 

Download:

 

Click the button to download the zip file which includes an installer.  Download the zip file to your desktop, unzip both files to your desktop and run the installer.  If successful, you can delete all the new files from your desktop.

 

Download

 

 

Once all the bugs are worked out, I'll be adding this to my plugin pack.

 

 

Source code:

 

Spoiler

Hahaha. No.

 

I can't take credit for all of this... lots of it was written by @toe_head2001 and Microsoft for another project... but, I did get it working for Paint.NET. 

 

  • Like 5
  • Upvote 1

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to post
Share on other sites
  • BoltBait changed the title to BoltBait's Charting Control v0.1

Very nice plugin! Thanks.

 

First crash: Enter some data and click on Tuesday.

 

Exception details:
System.ArgumentException: Object must be of type Double.
   at System.Double.CompareTo(Object value)
   at System.Windows.Forms.DataGridViewRowCollection.RowComparer.CompareObjects(Object value1, Object value2, Int32 rowIndex1, Int32 rowIndex2)
   at System.Windows.Forms.DataGridViewRowCollection.RowArrayList.Pivot(Int32 left, Int32 center, Int32 right)
   at System.Windows.Forms.DataGridViewRowCollection.RowArrayList.CustomQuickSort(Int32 left, Int32 right)
   at System.Windows.Forms.DataGridViewRowCollection.Sort(IComparer customComparer, Boolean ascending)
   at System.Windows.Forms.DataGridView.SortInternal(IComparer comparer, DataGridViewColumn dataGridViewColumn, ListSortDirection direction)
   at System.Windows.Forms.DataGridView.OnColumnHeaderMouseClick(DataGridViewCellMouseEventArgs e)
   at System.Windows.Forms.DataGridView.OnMouseClick(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 

Link to post
Share on other sites

Ah, I see, it is happening when you try to sort the rows of data by clicking on the column title.

 

This happens because there is a blank cell in that column.

 

EDIT: @xod This error is now prevented.  Redownload.

 

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to post
Share on other sites
18 minutes ago, welshblue said:

Crash with choosing Stacked Bar option in 3D mode ... 

 

This happened because you added a data entry row, but didn't add any data on that row.  Like this:

 

BadData.png

 

I'll fix this later.

  • Like 1

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to post
Share on other sites

I’ll prevent that error in the next build. But, I’m traveling for the next few days. At least you know how to avoid the error in the mean time. 

 

EDIT: I just started digging into the code on this issue... ugh... this might take a while. :(  I will probably take out the preview on the data entry screen. 

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to post
Share on other sites
  • BoltBait changed the title to BoltBait's Charts and Graphs Plugin v0.2 Updated Jun 22 2019

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...