coroo / nova-chartjs

A Simple Dashboard Chart in Laravel Nova using Chart JS. Starting create your own dashboard with Chart JS Integration can save your time and help you maintain consistency across standard elements such as Bar, Stacked, Line, Area, Doughnut and Pie Chart.
https://coroo.github.io/nova-chartjs
MIT License
214 stars 71 forks source link

[BUG] how to join multiple table. #105

Open ericfem opened 3 years ago

ericfem commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Dependencies Version (please complete the following information):

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

ericfem commented 3 years ago

how to join multiple table in novajs chart. is there a feature of this kind? It can only join 1 table.

alexrinaldi commented 3 years ago

I am joining the request, is there a way to join multiple tables?

ericfem commented 3 years ago

any updates or can help us with this issue?

BadreddineZatout commented 2 years ago

I am joining the request, is there a way to join multiple tables?

can you show me how are you joining the request?

jigar-dhulla commented 1 year ago

I am joining the request, is there a way to join multiple tables?

can you show me how are you joining the request?

This is how I am trying.

Looking at source, don't think calling multiple join() is acting like addJoin().

(new DoughnutChart())
    ->model('app\model\SomeModel')
    ->join('table_1', 'table_1.id', '=', 'some_models.table_1_id')
    ->join('table_2', 'table_2.id', '=', 'table_1.table_2_id')
    ->options([
        'queryFilter' => array(
            [
                'key' => 'table_2.table_2_attribute',
                'operator' => '=',
                'value' => 'some_value',
            ]
        )
    ])