Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Smart Chart doesn't show any Data

Discussion in 'General Graphics' started by seidlfranz, Apr 13, 2018.

  1. seidlfranz

    seidlfranz

    Joined:
    Mar 31, 2017
    Posts:
    12
    I got the following Problem, I bought the Smart Chart Asset of
    Toucan Systems.

    The video tutorial was made good and seemed to be simple to use.

    But after Buying it, I got the bad awaken, the video showed the old Version of the Asset.

    When trying to add a Chart as described in the tutorial, no data is shown inside.
    I tried copying some Demos but they only work in the original Demo Szene and not outside.
    Additional I got NullReferences and UnassignedReference Exceptions even in the Demo Szenes.

    So my Question, is there any simple and running way to draw charts in Unity or has anyone experiences with SmartChart and can help me solve my problems with it.
    Can I cancel an already done buy?

    Thanks.
     
  2. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    Better to contact the authors via website support contact page.
    https://toucan-systems.pl/kontakt

    "You have to uncheck experimental handles to make Smart Chart work.
    If you need more help just let me know.
    "

    The experimental handle is unchecked by default.

    Reading the comment section in the asset store there is this:

    "...The only downside is that I had to comment a line of code that was causing the chart gameobject to refresh and double its size every time I clicked on it. But, no worries, If you get this behavior, for some reason (I didn't at the start but I got this later), just go to the SmartChartEditor.cs script and do the following modification. Voilá! "

    Code (CSharp):
    1. public void Awake()    
    2. {        
    3.      //useCustomHandles = true;        
    4.      useCustomHandles = false;    
    5. }
    But this does not resolve the problem completely.
    This tool is Awesome and at the same time pretty unstable.
    I also notice that WebGlTest is almost empty with no chart
    RandomlyGeneratedData scene gives console error messages.
    For this problem, I found a partial solution

    Code (CSharp):
    1. public Material fillMaterial;
    2. public Shader shader;
    3.  
    4. Awake() {
    5.     shader = Shader.Find("Diffuse");
    6.     fillMaterial = new Material(shader);
    7. }
    The errors are gone but Smart Chart is not showing the lines in the graph. So is not a real solution.

    Is a bit difficult for a novice programmer how to pass X and Y data.
     
    Last edited: May 9, 2018
    franziseidl1 likes this.
  3. Falkosiq

    Falkosiq

    Joined:
    Feb 22, 2017
    Posts:
    3
    Hey, are you sure that your data line color alpha isn't set to 0?
     
  4. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    This asset contains several bugs, so we need to fix one at the time.

    I try to make a list using my info and other users info
    • Demos but they only work in the original Demo Szene and not outside.
    • NullReferences and UnassignedReference Exceptions even in the Demo Szenes.
    • Code causing the chart gameobject to refresh and double its size every time I clicked on it.
    • WebGlTest demo scene is almost empty with no chart.
    • RandomlyGeneratedData demo scene gives console error messages.
    • Fill Area Under Line Toggle is not working well; showing fill texture when is disable.
    • Is a bit difficult for a novice programmer to pass X and Y data.
    • When you select the chart, it collapses by itself and is difficult to restore
    • Is not possible to resize the chart when the resolution change using anchors on the corner
    "When you select the chart, it collapses by itself and is difficult to restore"
    is the most frustrating because it makes it unstable and probably triggering other bugs problems.
    So why don't we start fixing that problem?
    If I can, I will try to help. I will make a simple scene so that you can debug.
     
    Last edited: May 13, 2018
  5. Falkosiq

    Falkosiq

    Joined:
    Feb 22, 2017
    Posts:
    3
    Thank you for your report, we've fixed bugs you've mentioned. Update will be soon available on Asset Store :)
     
    AlanMattano likes this.
  6. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    Thanks @Falkosiq , I added two more bugs:
    • If you move the anchors the tool became crazy and it does not work as expected.
    • Please explain that in a documentation.[Do not move anchors] and how to restore in case we move the anchors. PDF with documentation can be helpful. or a 2017.4 Video Tutorial.
     
  7. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    In the new update looks like is not possible to scale the chart.
    I'm correct?
     
  8. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    How do I pass the second xy line to the chart?
    Code (CSharp):
    1. List<SmartChartData> ld_DataIndex = new List<SmartChartData>();
    2.             SmartChartData ld_chartLine = new SmartChartData();
    3.             ld_DataIndex.Add(ld_chartLine);
    4.             ld_chartLine.dataLineColor = lineColor;
    5.             ld_chartLine.dataFillColor = chartColor;
    6.             List<Vector2> tuturu_ld = new List<Vector2>();
    7.  
    8.             tuturu_ld.Add(new Vector2(alpha, ld));
    9.             ld_chartLine.data = tuturu_ld.ToArray();
    10.             ld_DataIndex[0] = ld_chartLine;
     
  9. Falkosiq

    Falkosiq

    Joined:
    Feb 22, 2017
    Posts:
    3
    You can still scale your chart using built-in unity handles (shortcut is T on keyboard). If you want to display multiple data sets you need to store them in the same array. I would recommend analysing sample codes included in SmartChart/Demo/Scripts :)
     
    AlanMattano likes this.
  10. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    Hi @Falkosiq I send you an email and a PM with the link of a clean project for debugging that has a bug that does not let me make the final build.
     
  11. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    I install Smart Chart
    After that Smart Chart gives you a warning

    I take that out by adding an "if" statement in SmartChartEditor.cs just in case useCustomHandles is used in a magic way


    Code (CSharp):
    1. public void Awake()
    2.         {
    3.             useCustomHandles = false;
    4.             if (useCustomHandles)
    5.             {
    6.                 // DO NOTHING..
    7.             }
    8.         }

    I also found this error
    This error does not let you build and run the project.

    Was difficult to understand how was triggering this particular error.
    How to fix this?
     
  12. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    I was able to create this using smart charts. But I'm unable to use the Unity the Bul&Run option.

    upload_2019-1-23_12-7-14.png