Skip to content

Commit 496c1ad

Browse files
committed
Smaller dots on line charts, text fixes on config, object renaming in internals.
1 parent 72a7fda commit 496c1ad

File tree

3 files changed

+98
-91
lines changed

3 files changed

+98
-91
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<name>Andreas Nyberg</name>
1010
<url>https://github.com/andnyb/chartjs-multifilter-jira-plugin</url>
1111
</organization>
12-
<name>mfgg</name>
12+
<name>chartjs-multifilter-jira-plugin</name>
1313
<description>Chart.js multi filter plugin for Atlassian JIRA.</description>
1414
<packaging>atlassian-plugin</packaging>
1515
<dependencies>

src/main/resources/atlassian-plugin.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
<param name="plugin-logo">images/plugin-logo.png</param>
1010
</plugin-info>
1111
<!-- add our web resources -->
12-
<web-resource key="mfgg-resources" name="mfgg Web Resources">
12+
<web-resource key="resources" name="Web Resources">
1313
<dependency>com.atlassian.auiplugin:ajs</dependency>
1414
<resource type="download" name="mfgg.css" location="/css/mfgg.css"/>
1515
<resource type="download" name="mfgg.js" location="/js/mfgg.js"/>
1616
<resource type="download" name="images/" location="/images"/>
1717
<context>mfgg</context>
1818
</web-resource>
19-
<gadget key="mfgg" location="mfgg-gadget.xml"/>
20-
<resource type="i18n" name="mfgg" location="org.andnyb.jira.plugin.mfgg"/>
19+
<gadget key="chartjs-multi-filter" location="mfgg-gadget.xml"/>
20+
<resource type="i18n" name="mfgg" location="org.andnyb.jira.plugin.chartjs-multi-filter"/>
2121
<resource type="download" name="thumbnail.png" location="images/chartjs-multifilter-thumb.png"/>
2222
<rest name="Multi Filter Rest Resource" i18n-name-key="multi-filter-rest-resource.name" key="multi-filter-data-resource"
2323
path="/multifilter" version="1.0">

src/main/resources/mfgg-gadget.xml

Lines changed: 94 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<ModulePrefs
66
title="Multi Filter Chart.js"
77
directory_title="Multi Filter Chart.js Gadget"
8-
description="Displays various graphs based on multiple filters."
9-
thumbnail='#staticResourceUrl("org.andnyb.jira.plugin.chartjs-multi-filter:mfgg", "thumbnail.png")'>
8+
description="Include multiple filters in various Chart.js based and interactive charts."
9+
thumbnail='#staticResourceUrl("org.andnyb.jira.plugin.chartjs-multi-filter:chartjs-multi-filter", "thumbnail.png")'>
1010

1111
<Require feature="dynamic-height" />
1212
<Optional feature="auth-refresh"/>
@@ -19,7 +19,7 @@
1919
<Param name="categories">Other</Param>
2020
</Optional>
2121
#oauth
22-
#supportedLocales("gadget.common,com.andnyb.jira.plugin.mfgg")
22+
#supportedLocales("gadget.common,com.andnyb.jira.plugin.chartjs-multi-filter")
2323
#supportLocales
2424
</ModulePrefs>
2525

@@ -49,6 +49,7 @@
4949
5050
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.js"></script>
5151
<canvas id="chart" height="2" width="3"/>
52+
<!--script src="js/mfgg.js" type="text/javascript"></script-->
5253
<script>
5354
var dataSet = {};
5455
(function () {
@@ -176,20 +177,20 @@
176177
{
177178
id: "filterIdField",
178179
userpref: "filterIdUserPref",
179-
label: "Filter id:",
180+
label: "Filter id(s):",
180181
required: "true",
181-
description: "Comma separated list of filter ids for the issues to display in the graph. Check the browser console log for errors when saving, configuration will not be saved if there are invalid filters.",
182+
description: "Comma separated list of filter ids for the issues to display in the graph. Filter ids are present in the browser URL when selected on the issue search page. Check the browser console log for errors if it not possible to save, configuration will not be saved if there are invalid filters.",
182183
type: "number text",
183184
value: gadget.getPref("filterIdUserPref")
184185
},
185186
{
186187
userpref: "graphLabelUserPref",
187-
label: "Graph labels:",
188+
label: "Graph label(s):",
188189
description: "Comma separated list of labels to use for the plotted graph.",
189190
type: "text",
190191
value: gadget.getPref("graphLabelUserPref")
191192
},
192-
AJS.gadget.fields.nowConfigured()
193+
AJS.gadget.fields.nowConfigured()
193194
]
194195
};
195196
}, // -> descriptor
@@ -203,95 +204,101 @@
203204
var g = this;
204205
var optionsDef;
205206
if (g.getPref("barTypeUserPref")=="line" ||
206-
g.getPref("barTypeUserPref")=="bar") {
207+
g.getPref("barTypeUserPref")=="bar") {
207208
optionsDef =
208-
{
209-
responsive: true,
210-
layout: {
211-
padding: {
212-
left: 25,
213-
right: 25,
214-
top: 0,
215-
bottom: 0
216-
}
217-
},
218-
scales: {
219-
yAxes: [
220-
{
221-
ticks: {
222-
beginAtZero: true
209+
{
210+
responsive: true,
211+
layout: {
212+
padding: {
213+
left: 25,
214+
right: 25,
215+
top: 0,
216+
bottom: 0
217+
}
218+
},
219+
scales: {
220+
yAxes: [
221+
{
222+
ticks: {
223+
beginAtZero: true
224+
}
223225
}
226+
]
227+
},
228+
elements: {
229+
point: {
230+
radius: 2,
231+
hoverRadius: 3
224232
}
225-
]
226-
}
227-
};
233+
}
234+
};
228235
}
229236
else if (g.getPref("barTypeUserPref")=="doughnut" ||
230-
g.getPref("barTypeUserPref")=="pie") {
237+
g.getPref("barTypeUserPref")=="pie") {
231238
optionsDef =
232-
{
233-
responsive: true,
234-
layout: {
235-
padding: {
236-
left: 25,
237-
right: 25,
238-
top: 0,
239-
bottom: 0
239+
{
240+
responsive: true,
241+
layout: {
242+
padding: {
243+
left: 25,
244+
right: 25,
245+
top: 0,
246+
bottom: 0
247+
}
240248
}
241-
}
242-
};
249+
};
243250
}
244251
else if (g.getPref("barTypeUserPref")=="horizontalBar") {
245252
optionsDef =
246-
{
247-
responsive: true,
248-
layout: {
249-
padding: {
250-
left: 25,
251-
right: 25,
252-
top: 0,
253-
bottom: 0
254-
}
255-
},
256-
scales: {
257-
xAxes: [
258-
{
259-
ticks: {
260-
beginAtZero: true
261-
}
253+
{
254+
responsive: true,
255+
layout: {
256+
padding: {
257+
left: 25,
258+
right: 25,
259+
top: 0,
260+
bottom: 0
262261
}
263-
]
264-
}
265-
};
262+
},
263+
scales: {
264+
xAxes: [
265+
{
266+
ticks: {
267+
beginAtZero: true
268+
}
269+
}
270+
]
271+
}
272+
};
266273
}
267274
else if (g.getPref("barTypeUserPref")=="stacked") {
268275
optionsDef =
269-
{
270-
responsive: true,
271-
layout: {
272-
padding: {
273-
left: 25,
274-
right: 25,
275-
top: 0,
276-
bottom: 0
277-
}
278-
},
279-
scales: {
280-
xAxes: [
281-
{
282-
ticks: {
283-
beginAtZero: true
284-
},
285-
stacked: true
286-
}
287-
],
288-
yAxes: [
289-
{
290-
stacked: true
276+
{
277+
responsive: true,
278+
layout: {
279+
padding: {
280+
left: 25,
281+
right: 25,
282+
top: 0,
283+
bottom: 0
291284
}
292-
]
293-
}
294-
};
285+
},
286+
scales: {
287+
xAxes: [
288+
{
289+
ticks: {
290+
beginAtZero: true
291+
},
292+
stacked: true
293+
}
294+
],
295+
yAxes: [
296+
{
297+
stacked: true
298+
}
299+
]
300+
}
301+
};
295302
296303
}
297304
var barType = g.getPref("barTypeUserPref");
@@ -332,12 +339,12 @@
332339
return {
333340
contentType: "application/json",
334341
url: "/rest/multifilter/1.0/data"
335-
+"?filters="+encodeURIComponent(this.getPref("filterIdUserPref"))
336-
+"&labels="+encodeURIComponent(this.getPref("graphLabelUserPref"))
337-
+"&granularity="+this.getPref("granularityUserPref")
338-
+"&category="+this.getPref("categoryUserPref")
339-
+"&type="+this.getPref("barTypeUserPref")
340-
+"&theme="+this.getPref("themeUserPref")
342+
+"?filters="+encodeURIComponent(this.getPref("filterIdUserPref"))
343+
+"&labels="+encodeURIComponent(this.getPref("graphLabelUserPref"))
344+
+"&granularity="+this.getPref("granularityUserPref")
345+
+"&category="+this.getPref("categoryUserPref")
346+
+"&type="+this.getPref("barTypeUserPref")
347+
+"&theme="+this.getPref("themeUserPref")
341348
};
342349
}
343350
}]

0 commit comments

Comments
 (0)