Quantcast
Channel: User i alarmed alien - Stack Overflow
Browsing latest articles
Browse All 42 View Live
↧

Comment by i alarmed alien on use modelformset with queryset and extra...

Please edit your answer to add an explanation of how your code works and how it solves the OP's problem. Many StackOverflow users are newbies and will not understand the code you have posted, so will...

View Article


Comment by i alarmed alien on auth.User.groups: (fields.E304) Reverse...

Please edit your answer to add an explanation of how your code works and how it solves the OP's problem. Many StackOverflow users are newbies and will not understand the code you have posted, so will...

View Article


Comment by i alarmed alien on AND OR in where with codingniter

Please edit your answer to add an explanation of how your code works and how it solves the OP's problem. Many StackOverflow users are newbies and will not understand the code you have posted, so will...

View Article

Comment by i alarmed alien on D3 Scale / Ticks - include min and max

@Paulie Please edit your question to include those details -- it is much easier for potential question answerers if all the information is in the same place. Not everyone reads the comments. Thanks!

View Article

Comment by i alarmed alien on Any way to connect the leaf nodes via a line in...

Please post the code you have tried so far, and read the advice on how to write a good question on StackOverflow. You can use the 'edit' link to amend your question to include the relevant details. You...

View Article


Comment by i alarmed alien on How can I set the width of HTML element,...

Separation of concerns—keeping styling information in a stylesheet—is also far better than an inline style attribute.

View Article

Comment by i alarmed alien on d3 tsvParser resulting in 1 column with the...

what do you get if you console.log(data) as the first thing you do in .then(function(data){...}?

View Article

Comment by i alarmed alien on Zoomable Sunburst

@Gordon I have made a zoomable dc.js sunburst, but you have to choose whether to have the zooming action separate from the filtering or not. Either decision can risk being unintuitive.

View Article


Comment by i alarmed alien on How to add a separator in D3 bar chart

@YasiruNilan Please post that as a new question with your code for the d3 version of the chart.

View Article


Comment by i alarmed alien on Getting Error on Text/CSV.pm when running Perl...

I would not use this method to install Perl modules (there are better technologies available which give you more control over the process), but it answers the specific question that the user asked.

View Article

Comment by i alarmed alien on In Python, how do I split a string and keep the...

you can also add in if x to ensure that the chunk produced by split has some content, i.e. result = [x + sep for x in text.split(sep) if x]

View Article

Comment by i alarmed alien on Python apyori seems to be miscalculating...

@AMC the code given is an MRE.

View Article

Comment by i alarmed alien on Perl post to php

It depends on what the server API is. Is there an auth endpoint that you need to login in to first? Sometimes you do an initial auth request and the server sends back a token that you would then add to...

View Article


Answer by i alarmed alien for D3js, how set points based on axis values (not...

The x and y scales are used to convert your values to the appropriate chart coordinates. To add your coordinates, you just need to use the scales that you have created to generate the correct x and y...

View Article

Answer by i alarmed alien for Edit D3 SVG's links position in a "radial" Chart

Here's how to fix your links:First, change the rectangle positioning so that they are centred over where the circle would be in the standard link-node diagram. Rather than hard-coding values in the...

View Article


Answer by i alarmed alien for Creating bidirectional graphs in D3.js

You can display a bidirectional arrow using the marker-start and marker-end path attributes. Define one or more marker elements in the defs of your SVG containing the arrow head shape you want to use,...

View Article

Answer by i alarmed alien for Brush and Zoom d3

For context, this is from some code that implements chart brushing:function brushed() { if (d3.event.sourceEvent && d3.event.sourceEvent.type === "zoom") return; // ignore brush-by-zoom var s =...

View Article


Answer by i alarmed alien for How to add text to svg circle in d3

There are numerous ways to add text labels to circles. In your code, you've added title elements to the circles, which usually show up as tooltips when you hover over the element. Unlike title...

View Article

Answer by i alarmed alien for Change color of selected li option with...

Rather than applying css inline using a style attribute, it's better to apply a css class to the element; you can then easily change how you display your 'active' elements without having dig into your...

View Article

Answer by i alarmed alien for D3js horizontal bar chart: how to add numbers...

It sounds like you were almost there with adding the labels. You want to add them to the g element that holds the rect bars, and add them after the rects so they will appear on top of the bars, so: var...

View Article

Answer by i alarmed alien for Do d3 elements need to be redefined with...

The simple answer to your question is "no, elements do not need to be redefined with repeated code." The longer answer (which I will try to keep short) concerns the d3 enter / update / exit paradigm...

View Article


Answer by i alarmed alien for Issue formatting data in JavaScript for a pie...

As noted in my comment, your problem is because d3.csv acts asynchronously, and input_data isn't populated when d3pie tries to create your chart.There is something highly suspicious going on with...

View Article


Answer by i alarmed alien for D3 treemap json implementation with d3.nest

Your code was almost complete; the only things missing were that you needed to add a fake root node to your hierarchy, to specify the accessor for the children, and to fix the value for the leaf nodes,...

View Article

Answer by i alarmed alien for Add event listener per nodes level on d3 chart

If you want to collapse all nodes except the root and the first set of children, you can run the following code:root.children.forEach(collapse);This recursively applies the collapse function to all the...

View Article

Answer by i alarmed alien for How to group HTML table entries with summary...

You can do this with d3.nest and a bit of data wrangling if you calculate the summary first and integrate it with the nested data. It will also be easier if you make a function for adding td elements...

View Article


Answer by i alarmed alien for D3 Chord Diagram Not Rendering Correctly

If you examine the dodgy arc, you will see you can flip it into the right place by altering the sign on the transform from (50,0) to (-50,0). If you then look at the code that assigns the transform, it...

View Article

Answer by i alarmed alien for Line chart function pulling out data from...

You don't need the " around the "function(d) { return y(d."+city+"); }" -- that tells javascript to interpret the text function(d) { return y(d. and ); } as a string, giving a y attribute of...

View Article

Answer by i alarmed alien for Force directed graphs nodes stick to the center

You have to adapt your code slightly as it currently assumes that you're working with circle elements, where you specify the centres using cx and cy, but you are now using g elements, which use...

View Article

Answer by i alarmed alien for d3.js updating from v3 to v5

I removed the top two lines, which were causing a parser error due to the missed ) in d3.csv("E2allProcEff.csv".then and the redundant loading of data by two different...

View Article



Answer by i alarmed alien for How to append multiple rectangles in D3?

You're successfully creating extra rectangles, but unfortunately they are all nested inside the first three rectangles. If you have a web developer extension on your browser, select one of the...

View Article

Answer by i alarmed alien for d3 - label placement for a nested pie chart

The layout that you have already is dependent on your data being uniform, which doesn't happen in the real world, so I found a data set and used it to create a pie chart that doesn't require perfect...

View Article

Answer by i alarmed alien for D3JS wrap text plugin overwritten after...

I've just come across the same issue elsewhere. It is because the text wrap function cannot act on a transition, it requires a selection. To fix your code, just move the text addition and wrap calls to...

View Article

Answer by i alarmed alien for d3.json() to load large file

Most visitors will not hang around for the page to load -- I thought that the demo was broken when I first visited the site. A few ideas:JSON is not a compact data format as the tag names get repeated...

View Article


Answer by i alarmed alien for dependent filtering with two jquery dropdowns

There are a few ways to solve this problem, but I think the easiest is to store the current values in a variable that both the select element change listeners and any code that needs it (e.g....

View Article

Answer by i alarmed alien for How to set the width and height of svg to be...

You can use the values from getClientBoundingRect() to set the width and height of your SVG:var bRect = legend.node().getBoundingClientRect() svg.attr('width', bRect.width + 10) .attr('height',...

View Article

Answer by i alarmed alien for D3JS chart: Hovering on some transitioning...

Things are getting messed up because you've added mouseover and mouseout event listeners that try to perform actions that conflict with the ongoing transition events. To fix the problem, don't add the...

View Article


Answer by i alarmed alien for Value above each bar stacked bar chart D3.js

You can use your existing y scale to calculate the position of the total in the same way that you've done with the top and bottom edges of the rectangles and the text on each. Rather than using d.y0 or...

View Article


Answer by i alarmed alien for Recursive function and this D3.JS

If you want to make your move function recursive, you need to call it from within itself. As always, there are numerous ways to do it, but if you have an array of points, you could either pass in the...

View Article

Answer by i alarmed alien for D3 Horizontal grouped stacked chart bars...

Your problem is with the offset of the bars from each other; if you hard-code a value, e.g. using translate(0,29), you are going to be in trouble when the chart data changes, and that makes the bars...

View Article

Returning results from a custom MediaWiki hook

I'm hacking an existing MediaWiki extension, ProcessCite, that adds a custom hook to the Cite extension. Since migrating to PHP 5.4 and MW 1.22 (from PHP 5.3 and MW 1.19.2), the extension does not...

View Article

transitive reduction algorithm: pseudocode?

I have been looking for an algorithm to perform a transitive reduction on a graph, but without success. There's nothing in my algorithms bible (Introduction To Algorithms by Cormen et al) and whilst...

View Article


Answer by i alarmed alien for What are the consequences of using percentage...

The main reason for giving image dimensions in HTML, rather than in CSS, is so that the user agent (the browser) can leave an appropriate amount of space in the page for the image while the browser is...

View Article
Browsing latest articles
Browse All 42 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>