The code is as follows:
Interface is as follows:
Because too much curve set, according to the legend is not added teelistbox, but it and illustrations of each sequence color is consistent,
In this help you a great god, is there any way to set the color illustrations of each series and each curve consistent color ~
In the initial tchart is not add series ~
Once again thank humbly everybody first a great god ~
CodePudding user response:
Design interface, a point on the tchart controls the right mouse button, select properties... ?CodePudding user response:
Thank you to me...Mainly is the code I wrote is the color of the random. Should be run every color just random once..
And has a different set of classification, the number of each group is not the same again.. So can't again and again set the color of the curve...
CodePudding user response:
Good problem solving ~With TChart1
. RefreshData
The AddSeries scLine
The AddSeries scLine
Series (2 * k - 2) XValues. DateTime=True
Series (2 * k - 1) XValues. DateTime=True
Series (2 * k - 2). The Title=(ListView1. ListItems. Item (k)) & amp; "Water rate
"Series (2 * k - 1). The Title=(ListView1. ListItems. Item (k)) & amp; "Gas production
"Series (2 * k - 2) VerticalAxis=aLeftAxis
Series (2 * k - 1) VerticalAxis=aRightAxis
Series (2 * k - 2). Color=RGB (, Rnd, Rnd Rnd * 256 * 256 * 256)
Series (2 * k - 1). The Color=RGB (, Rnd, Rnd Rnd * 256 * 256 * 256)
. Legend. LegendStyle=lsSeries
For I=1 To UBound (z3, 2) - 1
TChart1. Series (2 * k - 2). The AddXY (z3 (k, I)), z1 (k, I), "", TChart1. The Series (2 * k - 2). Color
TChart1. Series (2 * k - 1). The AddXY (z3 (k, I)) and z2 (k, I), "", TChart1. The Series (2 * k - 1). The Color
Next
End With