# Repo for graph panel

**URL:** <https://community.grafana.com/t/repo-for-graph-panel/5895>\
**Category:** Grafana Plugin Development\
**Created:** [March 5, 2018, 3:05pm UTC](https://community.grafana.com/t/repo-for-graph-panel/5895 "2018-03-05T15:05:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonyrock](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jonyrock/32/1649_2.png) [@jonyrock](https://community.grafana.com/u/jonyrock)\
**Post date:** [March 5, 2018, 3:05pm UTC](https://community.grafana.com/t/repo-for-graph-panel/5895/1 "2018-03-05T15:05:48Z")

</div>

We decided to make a repo where default graph-panel represented as a legit plugin with it’s version, repo and bugtracker. This is how it looks like [https://github.com/CorpGlory/grafana-graph-panel](https://github.com/CorpGlory/grafana-graph-panel)  
We think that each plugin should has it’s own repo.  
This allows easier to make plugins based on default plugins and make your contributions.  
For example, if I have a plugin which is fork of default plugin, I can much easier merge updates to my fork.

Now I am working on implementing this [https://github.com/grafana/grafana/issues/870](https://github.com/grafana/grafana/issues/870)  
So I started with creating a separate plugin which I can hack and test.

The idea comes from d3.js library: it is a big library which depend on smaller git repos.

Hey @daniellee, what do you think?

---

<div class="post-metadata">

**Author:** ![rozetko](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/rozetko/32/3184_2.png) [@rozetko](https://community.grafana.com/u/rozetko)\
**Post date:** [March 5, 2018, 3:24pm UTC](https://community.grafana.com/t/repo-for-graph-panel/5895/2 "2018-03-05T15:24:57Z")

</div>

There is a problem with taking this plugin out of Grafana: we got 404 error when importing modules: _colors_, _event\_manager_ and _time\_series2_. So we had to copy these modules in repo ([https://github.com/CorpGlory/grafana-graph-panel/tree/master/src/vendor/grafana](https://github.com/CorpGlory/grafana-graph-panel/tree/master/src/vendor/grafana)).  
It doesn’t seem like a good idea because it makes harder to keep plugin up to date with Grafana.  
Thereby, I have a question to Grafana developers:  
Is there a way to access them without having in bundle?

---

<div class="post-metadata">

**Author:** ![jonyrock](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jonyrock/32/1649_2.png) [@jonyrock](https://community.grafana.com/u/jonyrock)\
**Post date:** [March 6, 2018, 5:15pm UTC](https://community.grafana.com/t/repo-for-graph-panel/5895/3 "2018-03-06T17:15:10Z")

</div>

Also I think it is right that default plugins also has it’s own version

---

<div class="post-metadata">

**Author:** ![meghna15](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@meghna15](https://community.grafana.com/u/meghna15)\
**Post date:** [March 8, 2018, 8:10am UTC](https://community.grafana.com/t/repo-for-graph-panel/5895/4 "2018-03-08T08:10:24Z")

</div>

When i cloned this repo in data/plugins then after opening the multibar chart panel its giving

```auto
Plugin Error
Fetch error: 404 Not Found Instantiating http://localhost:8000/public/plugins/corpglory-multibar-graph-panel/module.js Loading plugins/corpglory-multibar-graph-panel/module

```

can u explain what is this plugin for and how it works

---

<div class="post-metadata">

**Author:** ![jonyrock](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jonyrock/32/1649_2.png) [@jonyrock](https://community.grafana.com/u/jonyrock)\
**Post date:** [March 8, 2018, 9:53am UTC](https://community.grafana.com/t/repo-for-graph-panel/5895/5 "2018-03-08T09:53:27Z")

</div>

Hey, the problem is that `dist` folder doesn’t have build (we havent made a release yet)

You need to go to repo folder and make

```auto
npm install
npm run build

```

in the cloned folder.

But this thread is about default graph panel fork (this is basis for multibar) panel.  
I encourage you to ask this kind of questions in project issues: [https://github.com/CorpGlory/grafana-multibar-graph-panel/issues](https://github.com/CorpGlory/grafana-multibar-graph-panel/issues)

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [March 9, 2018, 11:03am UTC](https://community.grafana.com/t/repo-for-graph-panel/5895/6 "2018-03-09T11:03:57Z")

</div>

We in the core Grafana team do not agree that each core panel/data source should have its own repo.

1. Introduces tons of problems around building, data migration and packaging
2. Introduces more work by having multiple sub-repos on a code level and on a support level.

However, it is totally fine that you have created your own graph panel repo and that you use that as a starting point for your plugins. And if it is of good quality then I am sure other people will use it too - although it contains much more than most people need I would say.

---

<div class="post-metadata">

**Author:** ![muratyildirim](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@muratyildirim](https://community.grafana.com/u/muratyildirim)\
**Post date:** [June 21, 2018, 9:27am UTC](https://community.grafana.com/t/repo-for-graph-panel/5895/7 "2018-06-21T09:27:09Z")

</div>

Hi Daniellee,

I try to draw two bar for each week for using graphs plugin but it gives me tolal valus’s open and closed columns as one bar. Is there any way?

Week Open Closed

* * *

W1 1 3  
W2 5 8  
…  
.

* * *

Select t1.week, t1.time\_sec,t1.open,t2.closed from  
(SELECT  
concat(‘W’, cast(weekofyear(str\_to\_date(reportdate,’%d-%m-%Y’)) as char)) as week,  
str\_to\_date(reportdate,’%d-%m-%Y’) as time\_sec,  
count(\*) as open  
from maximo\_sr group by week) t1  
inner join

(SELECT  
concat(‘W’, cast(weekofyear(str\_to\_date(statusdate,’%d-%m-%Y’)) as char)) as week,  
str\_to\_date(statusdate,’%d-%m-%Y’) as time\_sec,  
count(\*) as closed  
from maximo\_sr group by week) t2  
on t1.week = t2.week

* * *

Thanks.

---

<div class="post-metadata">

**Author:** ![muratyildirim](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@muratyildirim](https://community.grafana.com/u/muratyildirim)\
**Post date:** [June 26, 2018, 6:28am UTC](https://community.grafana.com/t/repo-for-graph-panel/5895/8 "2018-06-26T06:28:54Z")

</div>

Hello,  
Still need to help:)
