ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 13 replies, has 2 voices, and was last updated by Mike Kudelya Mike Kudelya 1 year ago.

  • Creator
    Topic
  • #22144

    abel
    Participant

    I have create my entity with some column and join column.
    When I create segment, it’s ok.
    When I create report, result in table grid is correctly, but line chart fail
    This is image:

    In chart, my label and value are column not join column. My label is “doc_date” and my value is “amount”. I was group by doc_date.
    What problem here?
    P/s: When I change chart_options in database, field “name”:”bar_chart” replace “name”:”line_chart”. The chart show 2 column, but not have label of vertical and horizontal, and not have date (horizontal)

Viewing 13 replies - 1 through 13 (of 13 total)
  • Author
    Replies
  • #22170

    abel
    Participant

    Another issue same that issue.
    When I create report for Magento Shipping Cart (with sample data) include:
    – Column: created_at and amount(SUM)
    – Group by: created_at
    – Line chart: X-created_at and Y-amount
    – No filter
    ==> It’s work fine, except chart (problem with line X)

    But when I add filter for created_at column, the chart are as same as photo above.

    What problem here?

    #22249
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    It seems all the values have the same date value. I have updated created_at on one value and got photo above.

    #22258

    abel
    Participant

    But in table report, it’s have 2 different date.
    And as same as in sample data

    #22262
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Probably this is the bug. If you try to add 3-5 different dates, problem will dissapear, right?

    #22275

    abel
    Participant

    Yes, it is.
    But why, with magento shopping cart (sample data). When I create report with 1 day => no show chart, with 2 days => chart is ok. What different?
    (Same in group by and filter, group by date, and sum amount)

    #22331
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    I have created task for the issue, thanks! As temporary solution you can replace this piece of code to:

    #22394

    abel
    Participant

    Thanks for answer 🙂
    I have 1 more question. I was created and used javascript, follow document in orocrm.com
    That’s my code:
    1. In direct mybundle/resources/public/js:
    – File Chart.min.js
    – In direct ../app/components, I have file test-chart.js with code

    2. In requirejs.yml:

    3. In template file:

    But why, when I call template, it’s not call this js. I already try

    What wrong here?

    #22429
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    I have just created a similar component and it works.

    Did you run these commands

    ?

    #22434

    abel
    Participant

    Yes, I was run these commands. All file in folder Resource/public was updated in web/bundles/…
    But it’s not working

    #22488
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    I have created src/Custom/Bundle/OroBundle/Resources/public/js/app/components/test.js:

    src/Custom/Bundle/OroBundle/Resources/config/requirejs.yml:

    and write this code after ‘{% block content_data %}’ in vendor/oro/crm/src/OroCRM/Bundle/SalesBundle/Resources/views/Lead/view.html.twig:

    It works! Are you sure that your template is rendering ? Put your <div> in existed code, for example lead view page. will be work or not?

    #22779

    abel
    Participant

    My template already show (when I check inspect, in my template have <div> and <canvas> tag).
    But it’s not work 🙁

    #22850

    abel
    Participant

    Update!
    I was used this js for different template, then it’s work fine …
    The different between 2 template is:
    – Template non working:
    + No extend exist template
    + Data return from controller

    – Template working:
    + Extend action update.html.twig, I call js in 1 block
    + Data return from controller

    So, what happened there?

    #22907
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    You have two ways to resolve this problem:

    first: using standard templates (with oro header, buttons, etc..), like lead view and extend it from OroUIBundle:actions:view.html.twig
    second: use empty page, initialize ComponentManager and run your component.

    Here is an example of second variant:

Viewing 13 replies - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.