nlottig94 / Capstone

For my Capstone
1 stars 1 forks source link

SVG Graph Help #2

Open nlottig94 opened 8 years ago

nlottig94 commented 8 years ago

@ebeshero I cannot get my SVG graph to output what I want it to. It just keeps outputting all of my questions and answers with no lines or anything. If you could help, I'd really appreciate it!! Thanks!!

The files are: capstoneSVG1 AND capstoneResultsForSVG

ebeshero commented 8 years ago

@nlottig94 I'll take a look soon! I see (before cloning your repo, just online) that you have hand-drawn what I think are your axes and tick marks on an axis. Are those showing in your output?

nlottig94 commented 8 years ago

Yes, I have done that. And no, they are not showing in my output.

ebeshero commented 8 years ago

OK--so it's probably an issue with coordinate space! Have you played with g transform translate?

nlottig94 commented 8 years ago

Yes. It is <g transform="translate(50, 250)">

ebeshero commented 8 years ago

So that is moving your graph to the right 50 pixels and down 250 pixels. Is that enough to put your graph in viewable space? (Mind you, I have not yet looked at your code--just coming up for air between grading papers for another class!)

nlottig94 commented 8 years ago

It should. It's a pretty small graph

ebeshero commented 8 years ago

Oh! And again I didn't look for this in your code yet, but check and see if you specified colors and anything to do with visibility of your lines...probably you have done that... There will be a reason why your SVG text elements are displaying but your lines are not, and it is probably something simple...

nlottig94 commented 8 years ago

My text elements aren't showing up either. All I am getting is a jumbled mess of text. Not even the specified text.

ebeshero commented 8 years ago

OK so that's an XSLT output problem, I bet...Can we add Greg to your repo so he can take a look too?

nlottig94 commented 8 years ago

Of course!

ebeshero commented 8 years ago

I think you need to add and invite him as a collaborator...I just cloned your repo now, so more in a bit...

nlottig94 commented 8 years ago

I've already done so!

ebeshero commented 8 years ago

Solved it I think. I'll push in a few mins

nlottig94 commented 8 years ago

Thanks so much!!

ebeshero commented 8 years ago

@nlottig94 @RJP43 I've pushed repaired XSLT and an SVG output file I generated that needs work but at least is visible in a browser window's coordinate space. There were a couple of serious problems: 1) Your XSL:template matching on the document node was positioned in the wrong place, after an HTML root element, which was mysteriously sitting outside a template. That was generating parsing errors.

2) It's complicated to output HTML with SVG because of namespace complications. I recommend just creating SVG itself, output as XML with its own SVG namespace, and build your HTML page separately to embed the SVG code. See my comments in your XSLT file.

Hope this helps!