Here is a macro example which I hacked together (Please change the path in the last line!):
run("Line Graph (21K)");
makeRectangle(91, 47, 135, 127);
run("Convert to Mask");
run("Save XY Coordinates...", "background=0 save=C:\\LineGraph.txt");
Essentially it thresholds the line, skeletonizes the mask (Process->Binary->Skeletonize) to remove unnecessary pixels and then saves the xy coodinates (see: Analyze->Tools->Save XY values).
Note that the values are recognized from top-left to bottom right. So maybe you have to transform the values