mpandroidchart i want to change dot color by some value in scatter chart - mpandroidchart

I want to make a scatter chart
It has a not x,y value but another value that change dot color
if its value over some value
Only i have found was
MPAndroidChart, set different color to bar in a bar chart based on y axis values
this.
But in my case, there is a special value that not effect on the graph
What can i do to solve this problem?
Please help me

You need to create ArrayList of third values for each entry after that you need to add following code to change colors respectively:
dataSet.setColors(new int[]{R.color.color1 , R.color.color2} , context);

Related

Allow user input of chart axis in QlikView

I'm creating a scatter chart in QlikView. I'd like the field used for the y-axis of the chart to be user selectable. For example, I create a scatter plot, and choose my x-axis as "field1" and y-axis as "field2".The actual expression in QlikView for the y-axis is SUM([field2]). This works fine to plot field1 vs. field 2.
Now, I have a list box for the user to select a field (using $Field). I can get the name of that field using GetFieldSelections($Field). That works fine as an expression for the label, but it doesn't work as an expression to replace the equivalent of SUM([field2]). How do I set my expression so that if the user chose "field2" in the listbox, I get the same result as my hard-coded "field2" expression? I tried Sum(GetFieldSelections($Field)) and that doesn't work at all. I'm guessing I need some other function which returns the field values for an input string of a field name, but I don't know what that is.
Thanks!
You could try this syntax :
Sum ($(=GetFieldSelections($Field)))
I've build a small example and it seem to work.

SSRS line chart

I have one question to the line chart.
I would like to create a line chart, which values are given. It should look like this chart here:
My question is, how can I implement this. I tried to put it as a stripline in the chart but it only shows a horizontal line without this steps at the beginning.
How can I create this line chart like in the picture above?
can I put into this:
the values.
Striplines are intended to display just a line across the chart, or varying width, height, to demonstrate an area... from MSDN
Strip lines, or strips, are horizontal or vertical ranges that shade the background of the chart in regular or custom intervals
To get the behaviour (I think) you require you can add a new series to the data you are returning with each of those datapoints. Irrespective of what other data you are charting, you can change the type of this series to Line Chart, and change the order of the series on teh chart to make it uppoermost.
Without further information - such as the data you are tyrying to superimpose this on - it's hard to advise further.

Is it posible to get the position of point on an excel graph axis

I'm not sure this is possible but thought this was the best place to ask.
Is it posible to get the position of a series value on a graph in excel?
For example, if I have a line graph in excel that has time along the x axis, is it possible to (using VBA) get the position of a specific point on that axis.
What I am trying to do is have a vertical line that is can be positioned based on a date entered by the user.
like this
Where the green line could be positioned by entering in a date (rather than just being manually moved) (or also it could be set to automatically move to the current date etc).
I was then thinking that if the position is on the graph is queryable, then I can just access the line object and move it to any position I wanted through VBA.
Any Ideas? or is this just not possible?
The "cleanest" way to do this is to add the line to the chart as a new series. In that way, Excel handles all of the positioning and your work is simplified. To get a vertical line on a chart, there are a number of options. I prefer this route:
Create a small 2x2 area with two dates and two values
Add in the date or x-axis value you want the line at (E3 in image). You can use =TODAY() here or some manually entered value.
Set the second x-axis value equal to the first
Use MAX and MIN on the data to get the values for each date. You can also use 0 and 1 and a secondary axis, but I think MAX/MIN is easier.
Add the data to the chart and format as a marker with straight line.
Formulas
E3: =TODAY()
E4: =E3
F3: =MIN(C3:C27)
F4: =MAX(C3:C27)
Result and chart data series for vertical line

Customized report colors "snapping" to windows default colors

I have a chart in an Access 2010 report for which I am trying to set colors of different series dynamically. The user can use checkboxes to select series to chart, with the intent being that the series on the chart will take its color from the BackColor property of the checkbox's label.
The problem is that when I run my code to create the report, the colors used are not the ones on the corresponding labels. Instead it looks like they are "snapping" to the list of colors at the following link, referred to as "standard windows colours". List of standard windows colors in RGB and Long
For example:
With myChart.SeriesCollection(1)
.Interior.Color = RGB(195, 215, 155)
End With
Sets series 1 to a dark grey color, and debug.print myChart.SeriesCollection(1).Interior.Color returns 12632256, rather than 10213315 like it should. (Long color = Red + Green*256 + Blue*65536)
I have tried opening the chart object and defining the custom colors that I want to see on the palette for the chart, and setting the appropriate colors for the series manually. This works until I try to programatically change anything, at which point, all of the colors snap to the list I linked above.
Any ideas for how to dynamically set chart colors to custom values?
Managed to answer my own question. Manually customizing the palette in MS Graph was necessary, but from there, I need to reference the colors by their index on the palette (using .Interior.ColorIndex), rather than from their RGB or Long code. The index numbers for the palette are not in any logical order, but can be found in a file accessible from this site.
It's not quite as dynamic as I had hoped for, but this is definitely good enough for what I need to do.

VB.NET: Mark Points in Line Chart

I'm creating a Chart with Lines on it in VB.NET. Now I got multiple Values in one Line. I want to mark certain of these values with a little Circle (or a Sqare, nevermind).
How do I have to do this?
It should look right light this:
How to Achieve?
Setting the Point's Marker does the Trick:
dataGridView1.Series(0).Points(0).MarkerStyle = DataVisualization.Charting.MarkerStyle.Circle
dataGridView1.Series(0).Points(0).MarkerSize = 10