Skip to content

Commit c6bf42f

Browse files
authored
Merge pull request #54 from tilak-io/dev
Fixed issue with GraphXY
2 parents b6e289e + 167500f commit c6bf42f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

api/server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,16 @@ def get_yt_values():
190190
def get_xy_values():
191191
field = request.get_json()
192192
table = field['table']
193-
columns = field['columns']
194-
columns.append("timestamp_tiplot")
195-
columns = list(set(columns))
193+
xCol = field['x']
194+
yCol = field['y']
195+
columns = [xCol, yCol, "timestamp_tiplot"]
196196
datadict = store.Store.get().datadict
197197
try:
198198
values = datadict[table][columns].fillna(0).to_dict('records')
199199
except:
200200
# columns not found
201201
values = []
202-
response = {"table": table, "x": columns[0], "y": columns[1] , "values": values}
202+
response = {"table": table, "x": xCol, "y": yCol, "values": values}
203203
return response
204204

205205
@app.route('/correlation', methods=['POST'])

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tiplot",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"private": true,
55
"homepage": "./",
66
"proxy": "http://localhost:5000",

src/controllers/PlotData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default class PlotData {
9393

9494
// get data for xy graphs
9595
getDataXY = async (x, y) => {
96-
const field = { table: x.table, columns: [x.column, y.column] };
96+
const field = { table: x.table, x: x.column, y: y.column };
9797
const response = await fetch(`http://localhost:${PORT}/values_xy`, {
9898
headers: {
9999
"Content-Type": "application/json",

0 commit comments

Comments
 (0)