I'm using highcharts heat map in my project. I have 12 rows and 7 columns in my heat map. When i pass the data hard coded the chart is displaying as required with 12x7 matrix. Now i need to pass the data in a json object from my database. When i9 do so, it is showing me 12x12 matrix with last five columns being empty and space being wasted. How can i remove these extra five columns. The chart is expecting some data to be passed ,where it is not,and I have not given any labels so it is displaying it as numbers after 7th column as 8 9 10 11 12. Can someone help?
Asked
Active
Viewed 714 times
0
-
Recreate issue on jsfiddle (with hardcoded JSON as some variable). I don't think that is caused by loading data via AJAX.. most probably you have some extra points (nulls?) in your data and that's the reason. – Paweł Fus Oct 03 '14 at 13:29
-
extra points Null, what do you exactly mean by that – chaitanya Oct 03 '14 at 13:38
-
I mean points with x/y value set to null. Like this: `data: [ [x, y, z], [x, y, z], [null, null, null] ...]` or: `data: [ [x, y, z], [x, y, z], null, null, null]`. – Paweł Fus Oct 03 '14 at 13:47
-
How to avoid them. I'm passing values for [x,y,z] where 0<= x <=7 ,0<= y <= 11 and z can be anything , then why isit assuming some null points. – chaitanya Oct 03 '14 at 14:05
-
Hard to say, without live demo. – Paweł Fus Oct 03 '14 at 17:14
-
I would have to assume it is how you are building your JSON from your data. That's what we need to see to be of any help... – jlbriggs Oct 03 '14 at 21:10
-
Ok, How can i show you guys my code? – chaitanya Oct 06 '14 at 06:21
-
@chaitanya supply us your data / chart configration. – Sebastian Bochan Oct 06 '14 at 12:47
-
is there a way i can show you my code. or can i type it in here in the comment box – chaitanya Oct 07 '14 at 05:59
-
Im posting the fiddle link where i updated my code and the json object i created through my php script. PHP code is used to fetch the data from my database and create a json object the php code is in javascript section. The json object created is in CSS section. Therr are some variables which convert the data iinto required format in between please dont be confused wiht them , Thanks http://jsfiddle.net/x03or9zp/2/ – chaitanya Oct 07 '14 at 06:05
1 Answers
0
(edit after review). Put fake data in the 'categories'. This will shrink the matrix back to 12x7, and you can suppress the display of the fake category data.

Jim Nathlich
- 11
- 3