Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Charts and Graphs for unity3d [Released]

Discussion in 'Assets and Asset Store' started by BitsplashIO, Jan 11, 2017.

  1. MatLoz

    MatLoz

    Joined:
    Dec 17, 2014
    Posts:
    25
    I'm also interesting in your answer to @Colin_MacLeod about clipping. Can you share the way to avoid it ?
     
  2. Reddevildragg

    Reddevildragg

    Joined:
    May 19, 2014
    Posts:
    47
    Hi
    Just a quick question, is there an easy way to enforce the y axis to represent only whole number? grabbing an image just of the asset store for example.
    upload_2020-5-26_15-30-55.png
    would be having this as 8/5/3/0 or something similar?

    Thanks for any help
     
  3. Ajay_11

    Ajay_11

    Joined:
    May 16, 2020
    Posts:
    1
    I am also facing the same issue. My Vuforia AR Camera Not able to render the text (Group, Category labels). it only showing 3D Bar chart. Please let me know how to fix this. below i attached the screenshot of output.
     

    Attached Files:

  4. SANDWYRM

    SANDWYRM

    Joined:
    Jun 13, 2020
    Posts:
    1
    Downloaded and imported this into my current project just now and was immediately greeted with an error regarding file:
    Assets/Chart And Graph/Resources/Chart And Graph/TextContorller/TextControllerCanvas.prefab

    Error:
    Code (CSharp):
    1. ArgumentException: Could not load Prefab contents at path Assets/Chart And Graph/Resources/Chart And Graph/TextContorller/TextControllerCanvas.prefab. Prefabs should have exactly 1 root GameObject, 0 was found.
    2. UnityEditor.PrefabUtility.LoadPrefabContents (System.String assetPath) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Prefabs/PrefabUtility.cs:1822)
    3. PrefabOverrideChart.CleanPrefab (System.String path) (at Assets/Chart And Graph/Editor/PrefabOverrideChart.cs:52)
    4. PrefabOverrideChart+<>c__DisplayClass0_0.<OnPostprocessAllAssets>b__0 () (at Assets/Chart And Graph/Editor/PrefabOverrideChart.cs:21)
    5. UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:322)
    This is not currently a blocker in my experience as of yet, so just wanted to make sure it got reported.
     
  5. carlo_unity237

    carlo_unity237

    Joined:
    Sep 29, 2018
    Posts:
    2
    Looks like the support/documentation web page is currently down.
     
  6. Gabriel_SG

    Gabriel_SG

    Joined:
    Apr 7, 2017
    Posts:
    202
    Yeah I tried to look at some tutorials and it seems like the webpage account is suspended.
     
  7. capgunmatt

    capgunmatt

    Joined:
    Feb 29, 2020
    Posts:
    7
    I'm setting some Y Axis labels manually like so:

    // Add Y Axis Labels for Range data
    foreach (var range in RangesList)
    {
    string RangeYValueString = range.MinHeight == Double.PositiveInfinity ? "100 %" : range.MinHeight.ToString() + "%";
    Graph.VerticalValueToStringMap[range.MinHeight] = RangeYValueString;
    }

    But it does not work.

    range.MinHeight is a double. The string is built correctly, e.g "56.6%"

    This loop is withing a larger method UpdateGraphData(), which is called like so:
    Graph.DataSource.StartBatch();
    UpdateGraphData();
    Graph.DataSource.EndBatch();

    Does anyone know why this is failing for me? Is it to do with the timing of when I called line `Graph.VerticalValueToStringMap[range.MinHeight] = RangeYValueString;`?

    The graph I have updates every second, calling UpdateGraphData() each time.

    Thanks for any help in advance.
     
  8. GilbertLau

    GilbertLau

    Joined:
    Dec 3, 2017
    Posts:
    26
    Is it possible to have two categories, one bound to left y axis and the second category bound to right y axis?
     
  9. rossw3_unity

    rossw3_unity

    Joined:
    Aug 17, 2020
    Posts:
    1
    Hi all hope this does not fall on silent ears but I've been having trouble "Converting between chart space and world space". I am currently working on a bar chart and i'm trying to get the top position, or really any position from the bar. I have tried just about every method and done numerous checks on the names of my categories and Groups. But have failed to get GetBarTrackPosition(), GetBarBottomPosition(), or PointToWorldSpace() to work in any capacity. Here is the code I have written
    Code (CSharp):
    1. public void Run()
    2.     {
    3.         bar.DataSource.StartBatch();
    4.         bar.DataSource.ClearValues();
    5.  
    6.         int[] barValues;
    7.         barValues = new int[10];
    8.  
    9.         var barChart = bar.GetComponent<BarChart>();
    10.  
    11.         for (int i = 0; i < barValues.Length; i++)
    12.         {
    13.             barValues[i] = UnityEngine.Random.Range(1, 30);
    14.  
    15.             string categoryName = (2011 + i).ToString();
    16.             barChart.DataSource.SetValue(categoryName, "Values", barValues[i]);
    17.  
    18.             float animationTime = 1.0f; // one second;
    19.             barChart.DataSource.SlideValue(categoryName, "Values", barValues[i], animationTime);
    20.         }
    21.  
    22.         bar.DataSource.EndBatch();
    23.  
    24.         meanCalculate(barValues);
    25.     }
    26.     public void meanCalculate(int[] values)
    27.     {
    28.         float mean = 0;
    29.         int sum = 0;
    30.  
    31.         for (int x = 0; x < values.Length; x++)
    32.         //sums up all the values
    33.         {
    34.             Debug.Log("value " + x.ToString() + ": " + values[x]);
    35.             sum += values[x];
    36.         }
    37.  
    38.         mean = sum / values.Length;
    39.         Debug.Log("mean: " + mean);
    40.         //calculates the mean
    41.  
    42.         var nearest = values.Aggregate((current, next) => Math.Abs((long)current - mean) < Math.Abs((long)next - mean) ? current : next);
    43.         Debug.Log("nearest: " + nearest);
    44.         int index = Array.IndexOf(values, nearest);
    45.         Debug.Log("Index: " + index);
    46.         string indexCategory = (2011+index).ToString();
    47.         Debug.Log("Index Category: " + indexCategory + "'");
    48.         //finds the closest value in the array to the mean at that index
    49.        
    50.         Vector3 bottomPosition;
    51.  
    52.         Debug.Log(bar.DataSource.GetCategoryName(index));
    53.         Debug.Log(bar.DataSource.GetGroupName(0));
    54.  
    55.         if (bar.GetBarBottomPosition(indexCategory, "Values", out bottomPosition))
    56.         {
    57.             meanPos = bottomPosition;
    58.             meanFullPos = bottomPosition;
    59.  
    60.             Debug.Log("Top Position: " + bottomPosition);
    61.             //topPosition now contains the top position of the bar
    62.         }
    63.         else
    64.         {
    65.             Debug.Log("FAILED, category at index:" + bar.DataSource.GetCategoryName(index) + " ");
    66.         }
    67.  
    68.     }
    Any help on this would be greatly appreciated because I have spent hours and hours trying to get this to work lol. Also provided is my graph settings in images
     

    Attached Files:

  10. CheilGermany

    CheilGermany

    Joined:
    Jul 15, 2020
    Posts:
    1
    Hi and thanks for the asset. Got it working really fast in my project.

    One thing bothers me though. Can you assign a lines color only with a material? So if I want to display 37 lines in a diagram, do I need to prepare 37 materials or is there a way to automatically have randomly different line colors?
     
  11. bpodell

    bpodell

    Joined:
    Nov 11, 2017
    Posts:
    3
    Thank you for creating a great chart plugin!

    Do you know how the values of the item labels can be changed? Some of the values overlap, so I would like to change, for example, 158302 to 158k. Being able to access these to format the values with commas (i.e. Change 158302 to 158,302) would also be helpful.

    Code (CSharp):
    1. //DayChart.GetComponent<ItemLabels>().TextFormat.Suffix = "k";
    2. DayChart.GetComponent<ItemLabels>().Text[i] = Math.Round(ItemLabelValue / 1000, 0).ToString() + "k";

    Change Item Labels.png
     
  12. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    87
    does this asset support import / export the data into a csv? i want to create something like this shown in the following video that will export into a formatted text file.

    first questions:
    1) how to change the vertical axis to -100 to 100
    2) how to change horizontal axis 0 to 100
    3) how to click and drag data points in the chart and then have this data change saved?

    the chart is show at 45 seconds in.
     
    Last edited: Aug 26, 2020
  13. GilbertLau

    GilbertLau

    Joined:
    Dec 3, 2017
    Posts:
    26
    I got an issue when running on android. The same code runs on Windows without issue. But then I run it on Andriod, the axes are misaligned. Is there any way to adjust it? Please see the screenshot attached. The Y axis shifted right and up Capture.JPG to the middle of the graph and x axis moved to start from the middle as well
     
  14. carlo_unity237

    carlo_unity237

    Joined:
    Sep 29, 2018
    Posts:
    2
    Hello, I'm using basic graph chart, like from the examples and I'm having trouble with adjusting the "point size" setting under Data categories. The setting does not seem to do anything as is, so I took a look at the code and it seems ProcesssPoint(... on the line 486 in CanvasLines.cs is overwriting the point size setting(ver. 1.91). Or am I missing something here?
     
    Last edited: Sep 7, 2020
  15. Juanchi_22

    Juanchi_22

    Joined:
    Oct 12, 2020
    Posts:
    2
    Hello, I hope that you are all fine!

    I've got a problem: I want to disable a category from script with the method DataSource.SetCategoryEnabled() that is explained in the documentation... But I receive this error that says "Error CS1061 'GraphData does not contain a definition for SetCateogryEnabled()'". I already create a variable that reference to the GraphChart that I am using.

    Is the method no longer supported or am I doing something wrong?

    Sorry for my english. Any help is welcome! Thanks
     
  16. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    make sure to write the correct method name, the one you wrote is not correct : SetCateogryEnabled
     
    Juanchi_22 likes this.
  17. Juanchi_22

    Juanchi_22

    Joined:
    Oct 12, 2020
    Posts:
    2
    Hi, thank you so much for your reply!

    I misspelled that, but in my script I have the method well written and the error remains the same. I'll keep looking and if I find something I'll leave it here.

    One last question: is there a way to shade an area between 2 lines of the Graph Chart?
     
  18. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    you can use graph fill for that purpose. feel free to contact support at support@bitsplash.io
     
  19. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    207
    Hi,

    I’m trying to animate the World Space Pie Chart – Angle span property with the Animator but it doesn’t animate the pie chart properly.


    Looks like it’s not being redrawn properly when using the Animator. Your script is working and manually changing the value works but not when going through the animator.


    Also, unrelated question, should I use the option that says “VR space Text” and “VR Space Scale” if I’m using ARfoundation and I’m working on a mobile app?

    Thank you
     
  20. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    113
    Hi there. Love the asset (especially the Playmaker actions. Thank you!)

    Is there a list of files I can safely remove from the asset prior to build?

    I'm using one simple 2D bar graph in my build, but included in the build are over 300 chart assets.

    None of them are very big, but they add up, and many seem unrelated to the chart I'm using.

    I'm trying to target asset folders that I can delete, but it's tricky. Any guidance would be appreciated.
     
  21. Lacostic

    Lacostic

    Joined:
    Nov 29, 2017
    Posts:
    14
    Hi, thank you for the awesome asset, bought it recently!
    I have couple questions:
    – is there a way to build gauge charts, like this ?
    – is it be possible somehow to design bezier curved radar chart, similar to this one ?
    Any help?
     
  22. ExtraCat

    ExtraCat

    Joined:
    Aug 30, 2019
    Posts:
    9
    Hm. I was considering buying this asset because it looks amazing.
    But now I see the author does not reply to customers for more than a month. Alas. No matter how awesome an asset is, unless it's just images/music/animations it needs support.
     
    Last edited: Dec 25, 2020
  23. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,529
    Hes a pretty active developer. I wouldn't say support is his highest strength though.
    Ive gotten support from him for for 2 years now on and off.

    The asset is pretty easy to use too. Could be better though. The over all code isn't smart enough on the back end. Which causes the user needing to adjust settings perfectly.
    The best graph asset I ever used was a javascript one for web. called linegraph.js
    This is the only graph asset I have tried. Mostly cause who wants to buy more than one lmao.
    In which i may still buy others to try.

    Over all If i was you. I would still buy it.
     
    MaxFritzhand likes this.
  24. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    hi
    Hi there, Unity should not deploy unused assets into your build. Only the assets of the resources folder. If you are still having issues contact me at support@bitsplash.io
     
  25. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    These are currently not supported
     
  26. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    Hello, For some reason i did not get notifications for unity about posts on the forum. However i recommend contacting me via support@bitsplash.io I will respond ASAP
     
  27. yohanscritch

    yohanscritch

    Joined:
    Apr 30, 2020
    Posts:
    22
    Hi Support,

    Thanks for this superb asset! I got 2 questions:

    - Is it possible to specify margins so that horizontal titles get contained? Here is what I've got:

    Capture d’écran 2021-01-01 à 13.15.29.png

    And this is what I'm aiming for:

    Capture d’écran 2021-01-01 à 13.17.25.png

    - I also want to develop the ability to change the timeframe, which is on the X Axis, i.e switching between Last 7 days/Last 30 days / All time.

    For the "last 7 days", I want to display days (Monday, Tuesday, etc.)
    For the "last 30 days", I want to display dates (07/08, 07/09, etc.)
    For the "all time", I want to display years or month depending of existing values (2017, 2018, 2019, or Jan, Feb, Mar...)

    I've seen that there is a method dedicated to the formatting:

    Code (CSharp):
    1. public static string DateToDateString(DateTime dateTime)
    2.         {
    3.             return dateTime.ToString("ddd");
    4.         }
    Is there a way to have different formatting?

    Thanks a lot,
     
  28. j7j7

    j7j7

    Joined:
    Jul 6, 2017
    Posts:
    1
    Hi, it seems your documentation website has expired - and so we cant get at the docs.
     
  29. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    regarding the formatting , you could do
    Graph.CustomDateTimeFormat = <C# format>

    regarding the other issue , please contact me at support@bitsplash.io , i'll see if i can make a patch for them.
     
  30. Crimsoncat

    Crimsoncat

    Joined:
    Apr 15, 2019
    Posts:
    1
    Unable to create prefep. Tell me how to make it.
     
  31. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    please contact me on support@bitsplash.io and elaborate on the issue.
     
  32. dc-Trevellyon

    dc-Trevellyon

    Joined:
    Feb 9, 2021
    Posts:
    4
    hello there
    I have two questions regarding the basic bar chart
    1) is there a way to get a 0 line when using automatic min and max values i.e. i want to show - figures and + figures but i also want ground zero..
    2) ia there a way to programatically turn off the on hover animation...
     
  33. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    Hi there.

    1) you can add a traker line on point 0 . see the marker tutorial folder for more infomration.
    2) Yes , you can set the hover prefab to null in the category settings.

    if you need any further assistance, it is best to contact me on support@bitsplash.io
     
    dc-Trevellyon likes this.
  34. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    113
    A recent (unfairly negative) review of this asset got me thinking. For anyone else experiencing importing issues, unexpected conflicts and errors, it could be you're importing an ancient version fo the asset, despite being updated to the newest one. It seems to stem from a change in the name of Asset Store publisher folder in UserData.

    I've owned your asset for quite a few years and the asset being imported was actually stored in a folder (in AppData/Roaming/Unity etc...) called ProActive (if I remember correctly). Inside this folder was a version dated 2018. Despite me downloading the latest 1.94 update multiple times, Unity kept importing the 2018 version. I could see the BitSlpash folder, and see it was the correct version, but it refused to import the correct one.

    Obviously, you do not need to rely on the Unity Package Importer. You can double click the correct asset from the folder, or import it manually from the Asset directory in Unity.

    I have solved the problem and can see, to my delight, a very handy Playmaker set of actions contained in the 1.94 version.
     
  35. byongmin

    byongmin

    Joined:
    Oct 8, 2015
    Posts:
    1
    An error occurs after import in the Package Manager . Why is this?

    Assets\Graph And Chart - Lite Edition\Script\CustomChartPointer.cs(46,30): error CS0115: 'CustomChartPointer.Raycast(Vector2, Camera)': no suitable method found to override
     
  36. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    make sure to import the unity ui package.
     
  37. komalsharma21294

    komalsharma21294

    Joined:
    Nov 5, 2018
    Posts:
    3
    Hi,

    I am using your product for oculus quest 2. It is a real good asset. I am trying to use oculus quest 2 controller component XR ray interactor to hover over the graph points to see the label just like with a mouse pointer. I tried to add an interactor event under On Hover Enter (under XR Ray Interactor). Added an event with Line Hover prefab and selected "ChartItemGrowEffect.Grow()" function. But it in doing nothing in the VR. Similarly, added another event with Point Hover prefab - "ChartItemGrowEffect.Grow()". Can anyone help??

    Thanks!
     
  38. BitsplashIO

    BitsplashIO

    Joined:
    Dec 9, 2016
    Posts:
    154
    Hi there,

    Try adding a CustomChartPointer component to your chart. If you are still having issues , please contact me at support@bitsplash.io
     
unityunity