BarChart Client Side

Posted by: jimmcgoldrick on 17 March 2020, 11:18 pm EST

    • Post Options:
    • Link

    Posted 17 March 2020, 11:18 pm EST

    I am working in ASP.Net Wijmo with net 4.6.1 and am working through the Client Side Example given on your support web site (https://www.grapecity.com/componentone/docs/webforms/online-barchart/drillingdowninbarchartdata1.html) . When I try to run the project it returns error “0x800a01b6 Object doesn’t support property or method ‘c1barchart’”. This is obviously the old name of the widget, but I have referred to it correctly throughout my code as ‘wijbarchart’. Is there a problem with the widget?

  • Posted 18 March 2020, 5:43 pm EST

    Hi,

    Can you please confirm whether you are using ASP Webforms on Wijmo3. If you are using Webforms, then the BarChart should be referenced using c1barchart and if you are using wijmo3, then only you will need to use the wijbarchart method.

    Regards,

    Ashwin

  • Posted 18 March 2020, 8:43 pm EST

    Hello Ashwin

    It was created as a Bare ASP.net Project, I’ll try it as Web Forms, and then let you know the outcome.

    cheers

    Jim Mac.

  • Posted 19 March 2020, 6:02 am EST

    I can confirm that the same error appears with ASP.NET Web Forms.

  • Posted 19 March 2020, 2:38 pm EST

    Hi Jim,

    Can you provide the sample you used to replicate the issue? It would be really helpful in finding the cause of the issue.

    ~regards

  • Posted 23 March 2020, 2:49 am EST

    You should have had my E-Mail and Attachment by now…

  • Posted 23 March 2020, 2:30 pm EST

    Hi,

    I have got the project. I am working on it and will update you as soon as possible.

    ~regards

  • Posted 23 March 2020, 3:09 pm EST

    Hi Jim,

    As I said in my first reply, if you are using BarChart on server-side (using ASP tags to create BarChart), then you have to access it on the client-side as c1barchart not wijbarchart. So, in your code, change all the references and let me know if this works.

    Before updating:

    $("#C1BarChart1").wijbarchart()
    

    After updating:

    $("#C1BarChart1").c1barchart()
    

    Also, the ID may change on the client-side. The ID of an ASP control is assigned to the client-side by ASP itself. So, you will need to store the ClientID of the BarChart and then use it to reference it on the client-side:

    var id = '<%=C1BarChart1.ClientID %>';
    $('#'+id).c1barchart()
    

    ~regards

  • Posted 23 March 2020, 7:49 pm EST

    Yup, get that feeling of deja vu:

    '0x800a01b6 - JavaScript runtime error: Object doesn’t support property or method ‘c1barchart’

    The intellisense interpreter recognises wijbarchart() as a property too, but not c1barchart. Please clarify the next step for me.

  • Posted 24 March 2020, 10:59 pm EST

    Hi Jim,

    I will follow the steps in the demo that you provided in the original query and will try to replicate the issue. I will share my observations with you as soon as possible.

    In the meantime, have you added the reference to C1.Web.Wijmo.4.dll assembly. If you did not, then add this assembly. It will be in the Extensions tab of the Reference Manager.

    After this, remove the following the scripts:

    <!--jQuery References-->
    <script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.10.1/jquery-ui.min.js" type="text/javascript"></script>
     
    <!--Theme-->
    <link href="http://cdn.wijmo.com/themes/aristo/jquery-wijmo.css" rel="stylesheet" type="text/css" />
     
    <!--Wijmo Widgets JavaScript-->
    <script src="http://cdn.wijmo.com/jquery.wijmo-open.all.3.20132.9.min.js" type="text/javascript"></script>
    <script src="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20132.9.min.js" type="text/javascript"></script>
    
    

    and run the sample and let me know the results.

    ~regards

  • Posted 25 March 2020, 12:56 am EST

    Hi Again

    Have made progress of a sort.

    I am already referencing the library “C1.Web.Wijmo.Controls.45” and its associates.

    Removing the references altogether got rid of the first error but lead to another.

    I seem to have a problem with the online example on the following page:

    https://www.grapecity.com/componentone/docs/webforms/online-barchart/step1of4setupyourapplication1.html

    If you go to the Point 7.b.2 and expand the Link ‘To write code in Source View’ -

    “<%http://helpcentral.componentone.com/nethelp/c1studioWeb%>”

    • this is completely wrong for the required coding. What should be the contents of the ‘GetOrders.asmx’ File. This seems to be the big problem with my code, and I cannot work round it. Please can you identify what has gone wrong!

      many thanks in advance,

      Jim Mac
  • Posted 25 March 2020, 6:13 pm EST

    Hi Jim,

    I followed the steps in the demo and ran into the same issue as yours. I have fixed the issue and attached the updated sample for your reference.

    To resolve the issue, you will need to use c1barchart method and remove all the jQuery and Wijmo’s reference, as I said earlier. Also, the source of GetOrders.asmx is incorrect. You may use the GetOrders.asmx file from the sample attached.

    I have forwarded this issue to the concerned team.

    Sorry for the inconvenience caused.

    ~regards

    BarChart-DrillDown.zip

  • Posted 29 March 2020, 7:17 pm EST

    Hi Ashwin

    First class laurels to that man! Saw that your example worked fine, so started looking for the differences compared to my (Non-Functioning) project. You were using .Net 4.8, so switched to that - no help. So looked in detail at the code. It went overlooked for a long spell, but then I noticed; in the GetOrders.cs and Orders.cs files, my code was surrounded by a Namespace directive, while yours was in the default namespace. Took the namespace out and - Cracked it, works like a charm now. Thanks for your gruesome lost weekend of groping for a solution.

    Many Thanks indeed,

    Jim McGoldrick

  • Posted 29 March 2020, 9:56 pm EST

    Hi Jim,

    I am glad that you were able to resolve the issue. Let us know in case you have any further queries or doubts.

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels