charts

How to display second y-axis to right of grouped bar chart data in d3

无人久伴 提交于 2019-12-11 09:07:15
问题 I am creating a grouped bar chart with d3 using the following example as my starting point. I've made a couple of minor modifications for readability as displayed in the screenshot below; the screenshot also demonstrates the issue I'm encountering. I want to add a second y-axis but naturally I want it to be all the way over to the right. As you can see from the screenshot though it is to the right of the left-oriented y-axis but also adjacent to it instead of to the right of the data. What I

Changing the order of data labels in Google Line Charts

余生长醉 提交于 2019-12-11 09:01:24
问题 I have a line chart, along the lines of the below, and I want to be able to set which label is on top. (In the example, would want "dogs" to be on top.) I realize I could do this manually -- just by switching the order of the columns -- but in practice I am dealing with large datasets and would much prefer to simply be able to specify the order in which the labels should appear on the axis without rearranging the columns themselves. Is there any way to do that? I could not find it in the

How to change the Y-Axis to show $ in graph

醉酒当歌 提交于 2019-12-11 08:44:51
问题 I want to see dollar sign along with the Y-Axis scale data. I am using ChartJS Version 2.1.0 for rendering graph. I looked into this LINK but I could not understand. I know I need to change my ScaleLabel but I am not able to do so. Kindly guide me. so scale 2000 should show as $2000 Below is what I have till now. define(['backbone'], function(Backbone) { var firstSubViewModel = Backbone.View.extend({ template: _.template($('#myChart-template').html()), render: function() { $(this.el).html

Google Line Chart starting coordinate?

风流意气都作罢 提交于 2019-12-11 08:37:32
问题 How to set the line chart setting so lines begin at x:0 , and not in some random way? Is there a prop for this, or i need to stack up more data???? 回答1: If your x values are numeric you can give the option hAxis: {minValue:0} to the draw function : function drawVisualization() { // Create and populate the data table. var data = new google.visualization.DataTable(); data.addColumn('number', 'x'); data.addColumn('number', 'Cats'); data.addColumn('number', 'Blanket 1'); data.addColumn('number',

How to add spikes to line on Winform chart?

泪湿孤枕 提交于 2019-12-11 08:32:58
问题 I am drawing a line on a graph from numbers read from a text file. There is a number on each line of the file which corresponds to the X co-ordinate while the Y co-ordinate is the line it is on. The requirements have now changed to include "special events" where if the number on the line is followed by the word special a spike will appear like image below: Currently the only way I can find is to use a line for each spike, however there could be a large of these special events and so needs to

brush in multiline chart is working for only one line

∥☆過路亽.° 提交于 2019-12-11 08:27:54
问题 am working on multi line chart with two lines and with brush and zoom in d3 v4, when i brush my only one line is moving my another line remains constant. Since i have just started learning this on my own i don't have idea on what changes i have to make so that my both lines moves when i brush. Any kind of suggestions would be of a great help. <!DOCTYPE html> <meta charset="utf-8"> <style> .line { fill: none; stroke: steelblue; stroke-width: 1.5px; } .zoom { cursor: move; fill: none; pointer

Google chart: “Uncaught (in promise) Error: Unknown header type: 4.7278” error

邮差的信 提交于 2019-12-11 08:26:57
问题 I'm trying to display a line chart of currency rates via google charts. Basically i have 2 type of values: Date (format iso8601) Rate (decimal number) when i'm trying to render the chart i get an error: "Uncaught (in promise) Error: Unknown header type: 4.7278” Here is my code: PHP array making: $xml=simplexml_load_file('https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/usd.xml') or die("Error: Cannot create object"); $arrayForChart[] = ["Date","Rate

Change Label Color in a Chart Control

无人久伴 提交于 2019-12-11 08:25:51
问题 The question I have seems to be simple but I can't find an answer around the Internet for that and even trying around did not help me. I just want to change the color of a Legend (from a Series). I know how to change the text color but I need to change the color of that marker. chart1.Legends["1"].ForeColor = Color.Transparent; chart1.Legends["1"].BackColor = Color.Transparent; does not help Is this possible? Thank you! EDIT: I want to change the blue color to another. Hope this is more clear

Google Charts - placing custom formatting axis values

回眸只為那壹抹淺笑 提交于 2019-12-11 07:59:33
问题 I have some numeric data (e.g. "1, 2, 3, 4, 5..") based on which I want to build a chart. However, instead of raw numbers, I want to show other text as axis values. For example, instead of number "1" I want to display "one" Is that possible to do with Google Charts? 回答1: using object notation, you can provide the value ( v: ) and the formatted value ( f: ) for each tick {v: 1, f: 'one'} see following working snippet... google.charts.load('current', { packages: ['corechart'] }).then(function (

How to implement grouped chart of stacked chart and bar chart using d3js v4

淺唱寂寞╮ 提交于 2019-12-11 07:58:46
问题 I want to implement a grouped chart, which will have stacked chart and a bar chart. I am new to d3.js charts and little confused about the approach to build mixed kind of chart. I have tried to built a stacked chart and painted bar chart, here I have some doubts that these two charts are not grouped very well. Please find my approach in the below fiddle. Demo Fiddle 来源: https://stackoverflow.com/questions/44977119/how-to-implement-grouped-chart-of-stacked-chart-and-bar-chart-using-d3js-v4