charts

ChartJs custom tooltip position

ぃ、小莉子 提交于 2021-02-18 11:34:50
问题 there. I use ChartJS and customise tooltip, but have issue with position first and last tooltip's. Look: I suppose that in order to fix the problem, I need to use the https://www.chartjs.org/docs/latest/configuration/tooltip.html#position-modes but, I cannot understand what the formula should be. CodePen example - https://codepen.io/anon/pen/JzRooy <html> <head> <title>Line Chart with Custom Tooltips</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.bundle.js"><

Making the labels responsive in chart js

三世轮回 提交于 2021-02-18 11:24:06
问题 I'm having a hard time making the labels in the y-axis responsive.I want the labels to move to multiple lines and have responsive font sizes when the space is not enough.I'm using the chart.js datalabels library for labelling on top of horizontalBar Graph.Also the labels are getting hidden due to the outer chart container. var chart = new Chart('ctx', { type: 'horizontalBar', data: { labels: ["Something something something", "blah blah..", "blah blah..","Something something something"],

Chart.js : How I change the x axes ticks labels alignment in any sizes?

廉价感情. 提交于 2021-02-17 05:52:24
问题 How can I move my labels on my x axes in between another x axes label. Nothing seems to work and I was unable to find anything on the docs. Is there a workaround? I'm using line chart time series. https://www.chartjs.org/samples/latest/scales/time/financial.html Currently, with the code I have its generating the figure below: var cfg = { elements:{ point: { radius: 4 } }, data: { datasets: [ { label: 'vsy', backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(), borderColor:

Add axis name into chart c#

天涯浪子 提交于 2021-02-16 14:31:25
问题 I'm working with winforms using C#. I use chart and I want to set the titles of the X- and Y-axis in code. I tried chart1.chartarea(0).axisX.title = "xxx" but it does't work and I don't know why. 回答1: I am using the charts control on the web and setting the X and Y axis titles are done in the following way. I assume the API would be the same for winforms. var chartArea = new ChartArea("MyChart"); ... chartArea.AxisX.Title = "xxx"; chartArea.AxisY.Title = "yyy"; 回答2: None of the solutions

Google Treemap: want to put color of node in red, green and amber

左心房为你撑大大i 提交于 2021-02-16 14:28:33
问题 I am using Google Treemap to show department wise data. I am not being able to set the color of nodes in which I want. I don't know whether colors are decided by treemap itself. google.load('visualization', '1', {packages: ['treemap'], callback: drawVisualization}); function drawVisualization() { // Create and populate the data table. var dataArray = []; dataArray.push(['Department Name', 'Parent', 'Number of Goals', 'color']); dataArray.push(['Goals by Team', null, 0, 0]); dataArray.push([

Google Treemap: want to put color of node in red, green and amber

∥☆過路亽.° 提交于 2021-02-16 14:28:26
问题 I am using Google Treemap to show department wise data. I am not being able to set the color of nodes in which I want. I don't know whether colors are decided by treemap itself. google.load('visualization', '1', {packages: ['treemap'], callback: drawVisualization}); function drawVisualization() { // Create and populate the data table. var dataArray = []; dataArray.push(['Department Name', 'Parent', 'Number of Goals', 'color']); dataArray.push(['Goals by Team', null, 0, 0]); dataArray.push([

Export Excel chart to SVG creates an empty file

旧时模样 提交于 2021-02-16 07:15:53
问题 I am trying to export an Excel chart in SVG format using VBA. Set objChrt = ActiveChart.Parent objChrt.Activate Set curChart = objChrt.Chart curChart.Export fileName:=fileName, FilterName:="SVG" If I replace "SVG" by "PNG", the export works exactly as intended and produces a valid PNG file. However, "SVG" results in an empty file. (Manually, there is an option to save as SVG inside Excel 365, so the export filter exists). According to the documentation, Filtername is "The language-independent

Export Excel chart to SVG creates an empty file

牧云@^-^@ 提交于 2021-02-16 07:13:10
问题 I am trying to export an Excel chart in SVG format using VBA. Set objChrt = ActiveChart.Parent objChrt.Activate Set curChart = objChrt.Chart curChart.Export fileName:=fileName, FilterName:="SVG" If I replace "SVG" by "PNG", the export works exactly as intended and produces a valid PNG file. However, "SVG" results in an empty file. (Manually, there is an option to save as SVG inside Excel 365, so the export filter exists). According to the documentation, Filtername is "The language-independent

How to display stackbarchart in table foreach row?

坚强是说给别人听的谎言 提交于 2021-02-11 18:18:41
问题 I have table and 5 column and one of the columns has StackBarChart in it. Basicly what i want to do is this. Is there any way to loop chart and display one for each row? I refer to this link but still didn't work below is my code <table class="table"> <tr> <th>Name</th> <th>Total MD</th> <th>Total LR</th> <th>Total LB</th> <th> Graph</th> </tr> @foreach($detail_laka as $laka) </tr> <td>{{$laka->name}}</td> <td>{{$laka->total_md}}</td> <td>{{$laka->total_lb}}</td> <td>{{$laka->total_lr}}</td>

How to display stackbarchart in table foreach row?

人走茶凉 提交于 2021-02-11 18:17:07
问题 I have table and 5 column and one of the columns has StackBarChart in it. Basicly what i want to do is this. Is there any way to loop chart and display one for each row? I refer to this link but still didn't work below is my code <table class="table"> <tr> <th>Name</th> <th>Total MD</th> <th>Total LR</th> <th>Total LB</th> <th> Graph</th> </tr> @foreach($detail_laka as $laka) </tr> <td>{{$laka->name}}</td> <td>{{$laka->total_md}}</td> <td>{{$laka->total_lb}}</td> <td>{{$laka->total_lr}}</td>