Posts

Showing posts with the label D3JS

D3Js Exploding Pie Chart Part 1

    With one of my current projects, I have been working on creating a way for users to click on individual pieces of a pie chart and slightly pull out that portion. It's a small and pointless feature, something I like to call eye candy in the front-end world.  For people some people it illustrates the content better. I found myself interested in UX. It's fun for me to recreate in d3js since the problem is challenging. Problem    This isn't a math problem but more of svg drawing problem, at the point where d3js draws out the pie chart there is some calculations to the index to see it out of order but if I can understand the method being used then I can modify it to include the exploding property. var explode = function ( x , index ) { var offset = 80 ; var angle = ( x . startAngle + x . endAngle ) / 2 ; var xOff = Math . sin ( angle )* offset ; var yOff = - Math . cos ( angle )* offset ; return "translate(" + xOff + ","

Web/Game Development - Math Isn't going to be a Problem

    When I was in college I wondered how much math I would need to become a game developer. Just for one of my associate degrees I had to take calc 2 which honestly wasn't that bad, I think the physics based calc was more of a challenge but that's in the past now. The real work begins is in my career and a lot of times my math isn't what it needs to be to create a proper solution. When I was building penguins-rising I didn't have any problems with coding just solving some algebra. So I went out of my way after that project to study what I could. Terms & Studies Geometrics Orientation (vector space) Making a Rotation Matrix From Scratch - YouTube Textures Phong reflection model http://cs.jsu.edu/~leathrum/Mathlets/parapath.html created by a student that shows how graphs can be modified . Fuzzy set Algebra (of course) Vertices Vectors? Just going off my knowledge with C++ This is just a few things I've come across over the years as a devel

Project: Raft Draft for Data-Steamer

Image
The purpose of this project is to wrap a set of d3js "graphics" and make them easier to create for non-javascript developers. The second reason is to standarize interactions and styles that are acceptable to the site and types of graphs needed. The final result of this project will simple be a wrapper for d3js with well defined graphs that can be  marked up with   html or with model binding (razor syntax). P.S. t his Project will be located here ! Details: There are currently four types of graphs, a line-chart , side-chart , pie-chart and bar-chart . All are used within a div tag and used as an attribute. Styling is always handled with the css (if it can be helps) and compliant with the css libraries like bootstrap. The coloring is based on a base color scheme provided by 3d but I might also base it on whatever css library is being used. From example bootstrap's primary color but I'm just thinking out load on this. Example:       <div line-c

Make d3js Responsive

Image
    This is probably the most popular quesition I see and is somewhat my main concern as far as things go with one of my projects. Now this isn't a perfect solution but its doesn't depend on jquery or anything else. So it keeps things in the d3js scope which is really what I want since I don't always include jquery in all of my projects. function resize() { //Top Nav has a bottom padding for 50px's width = window.innerWidth, height = window.innerHeight; svg.attr("width", width).attr("height", height); force.size([width, height]).resume(); } window.addEventListener('resize', resize()); var svg = d3.select("body").append("svg") //.attr("viewBox", "0 0 " + width + " " + height) //.attr("preserveAspectRatio", "xMidYMid meet"); Secret project I'm working on...      I didn't include the comments in my proje

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql