delphi - OpenOffice Calc automation how alter a chart label of a scatter diagram -


hello please me following. have created scattered chart , draw chart data of column. used data not after cell determines label:

column o:  pwm1   <-- cell want see label 27114  <-- not used data graph 27055  <-- etc 27092 27070  <-- data graph starts here 27105 27024 27092  <-- data graph ends here 

i label cell appear y column label name (is 'column o'), how? far got (code delphi if me basic example that's ok too):

(* turn symbol of data points off *) ochart.diagram.symboltype := _chartchartsymboltypenone;  odataseries := ochart.getuseddata; odatasequences := odataseries.getdatasequences; showmessage(odatasequences[1].label.sourcerangerepresentation); 

sourcerangerepresentation returns current label, how change?

thanks ad

this did it:

(* creat new datasequence range representaion provides real data , role in series odataprovider: com.sun.star.chart2.data.xdataprovider srangerepresentation: range address e.g. sheet1.a1:b2 srole: role defined in com.sun.star.chart2.data.datasequencerole *) function createdatasequence( odataprovider : variant; srangerepresentation : string; srole :string ) : variant; var         odatasequence : variant;  begin  (* create .chart2.data.datasequence range representation *)  odatasequence := odataprovider.createdatasequencebyrangerepresentation(srangerepresentation);  if not varisempty(odatasequence)   odatasequence.role := srole;   result := odatasequence; end;   onewlabel := createdatasequence(ochart.getdataprovider, '$sheet1.$o$7', 'label'); odatasequences[1].setlabel(onewlabel); 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -