New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-521 Adds N-D Data to Column Chart #535

Merged
merged 1 commit into from Jul 1, 2015

Conversation

Projects
None yet
2 participants
@anmoljagetia
Contributor

anmoljagetia commented Jun 29, 2015

Fixes GH-521

Signed-off-by: Anmol Jagetia anmoljagetia@gmail.com

@anmoljagetia anmoljagetia force-pushed the anmoljagetia:ndColumn branch 2 times, most recently from 061a9e6 to 2fee084 Jun 29, 2015

function Column(target) {
XYAxis.call(this);
I2DChart.call(this);
this._linearGap = 25;

This comment has been minimized.

@GordonSmith

GordonSmith Jun 29, 2015

Member

Why deleting _linearGap?

This comment has been minimized.

@anmoljagetia

anmoljagetia Jun 29, 2015

Contributor

I think I removed it by mistake, during the merge. Will fix this.

Column.prototype.publish("paletteID", "default", "set", "Palette ID", Column.prototype._palette.switch(),{tags:['Basic','Shared']});
Column.prototype.testData2 = function () {

This comment has been minimized.

@GordonSmith

GordonSmith Jun 29, 2015

Member

Where is this from?

This comment has been minimized.

@anmoljagetia

anmoljagetia Jun 29, 2015

Contributor

Again, mistake from the merge, this has been moved into the XYAxis now (I think!)

column.exit().transition()

This comment has been minimized.

@GordonSmith

GordonSmith Jun 29, 2015

Member

This is still needed,

@anmoljagetia anmoljagetia force-pushed the anmoljagetia:ndColumn branch 2 times, most recently from 0a2fa1f to 733965c Jun 29, 2015

case "linear":
case "time":
dataLen = Math.max(Math.abs(this.dataScale(2) - this.dataScale(1)) * (100 - this._linearGap) / 100, 1);
// dataPos -= dataLen / 2;

This comment has been minimized.

@GordonSmith

GordonSmith Jun 30, 2015

Member

We must work this back into your xpos for the linear / time xAxisType

@anmoljagetia anmoljagetia force-pushed the anmoljagetia:ndColumn branch 3 times, most recently from de11f39 to 7171cde Jun 30, 2015

break;
case "linear":
case "time":
dataLen = Math.max(Math.abs(this.dataScale(2) - this.dataScale(1)) * (100 - this._linearGap) / 100, 1);

This comment has been minimized.

@GordonSmith

GordonSmith Jul 1, 2015

Member

Instead of , 1); make it , dataLen);

var dataLen = 10;
switch (this.xAxisType()) {
case "ordinal":
dataLen = this.dataScale.rangeBand();

This comment has been minimized.

@GordonSmith

GordonSmith Jul 1, 2015

Member

indentation

var element = d3.select(this);
var dataPos = context.dataScale(d[0]);
var dataLen = 10;
var offset = 0;

This comment has been minimized.

@GordonSmith

GordonSmith Jul 1, 2015

Member

The offset can be calculated inside the same switch statement that the dataLen is calculated.

dataPos -= dataLen / 2;
break;
offset = -dataLen/2;
break;

This comment has been minimized.

@GordonSmith

GordonSmith Jul 1, 2015

Member

indentation

.attr("height", dataLen)
columnRect.transition()
.attr("class", "columnRect")
.attr("y", function (d, idx) { return context.dataScale(dataRow[0]) + columnScale(context._columns[idx + 1]);})

This comment has been minimized.

@GordonSmith

GordonSmith Jul 1, 2015

Member

This will need the offset also

@anmoljagetia anmoljagetia force-pushed the anmoljagetia:ndColumn branch 2 times, most recently from 21c6699 to 4f872db Jul 1, 2015

;
var column = this.svgData.selectAll(".dataRow")
.data(this.data())

This comment has been minimized.

@GordonSmith

GordonSmith Jul 1, 2015

Member

Should be this.formattedData() as per old line 27

GH-521 Adds N-D Data to Column Chart
Fixes GH-521

Signed-off-by: Anmol Jagetia <anmoljagetia@gmail.com>

@anmoljagetia anmoljagetia force-pushed the anmoljagetia:ndColumn branch from 4f872db to fc8e2e9 Jul 1, 2015

@GordonSmith

This comment has been minimized.

Member

GordonSmith commented Jul 1, 2015

Looks good.

GordonSmith added a commit that referenced this pull request Jul 1, 2015

Merge pull request #535 from anmoljagetia/ndColumn
GH-521 Adds N-D Data to Column Chart

@GordonSmith GordonSmith merged commit ca2f304 into hpcc-systems:master Jul 1, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment